Commit Graph

24 Commits

Author SHA1 Message Date
Dan Bungert 78d55da71b setup.py: start migration away from distutils
Follow guidance from PEP 632 and move some of this over to setuputils.
build.build lacks a straightforward answer, use the vendored copy of
distutils found in setuptools but delaying the import until after
setuptools.
2022-12-14 10:32:20 -07:00
Michael Hudson-Doyle f2e05f993d do apt configuration before install starts
via lots of overlays
2021-11-17 12:57:26 +13:00
Dan Bungert 5b425b2ea0 ssh: fix PYTHONPATH 2021-10-07 15:57:37 -06:00
Dan Bungert be158a375f snapcraft: environment and package fixes
* adjust environment to set PYTHONPATH to pick up site-packages
* add more required packages
* add script for subiquity-server, and set PYTHONPATH there,
  so that the PYTHONPATH takes effect
2021-10-01 13:59:10 -06:00
Jinming Wu, Patrick 91fb547fe8 Makefile & setup.py: include corr. build cmds 2021-08-31 15:52:03 +02:00
Michael Hudson-Doyle fac360b8e7 remove curtin hook to bind mount /run into target now curtin does this
Curtin added this in version 19.3 so we can stop doing it.
2021-03-29 14:49:59 +13:00
Michael Hudson-Doyle 58af29b933 update github urls to new organization 2021-02-23 12:03:37 +13:00
Michael Hudson-Doyle c0f0e3caaa add subiquity-server to snap 2020-09-23 13:29:01 +12:00
Michael Hudson-Doyle 65667c6a61 make a separate build_i18n command again
otherwise you might get the one from distutils-extra which does not do
the right thing any more
2020-05-21 11:27:55 +12:00
Michael Hudson-Doyle 6f8bab49e5 log commands as executed 2020-05-11 16:30:29 +12:00
Michael Hudson-Doyle 59c47254e7 use pgettext in one place, add support for extracting it 2020-05-08 15:13:15 +12:00
Michael Hudson-Doyle 48736606ec inline streamlined version of build_i18n & intltool into our setup.py
I found the layers and layers of other tools just confusing.

"python3 setup.py build" generates an identical (apart from timestamp)
POT file and an identical build directory before and after this change.
2020-05-08 15:01:06 +12:00
Dimitri John Ledkov 2dddbc9d1a And setup.py too. 2019-05-09 15:49:05 +01:00
Michael Hudson-Doyle 6de5dbbd8e configure apt during installs to prefer installation from install media 2019-03-29 10:55:16 +13:00
Michael Hudson-Doyle 9ef56239f8 fix snap build
* use a different way to avoid depending on i18n in tox
 * add __init__.py files to new packages
2018-06-13 13:21:20 +12:00
Scott Moser af94275618 Make tox and Makefile more similar.
This does a few things with the end goal of making simplifying and
making consistent tox and 'make' methods of test or check.

Things here:
 * move python programs out of bin and into their own main.  Use
   entry_points to get scripts written for them.  One gain here is
   that we no longer have python programs that are not named .py.
   flake8 and friends would not check those programs by default.
 * install scripts in bin/ using the setup.py scripts and adjust
   snapcraft.yaml and debian packaging for that.
 * declare and use PYTHON in Makefile to avoid repeating 'python3'
 * declare and use CHECK_DIRS in Makefile for list of dirs to check.
 * no longer run 'flake8' from 'make check' by default.
 * remove the old tests/ directory.
2018-06-05 22:19:17 -04:00
Scott Moser bf807867c3 setup.py: fix package build. (#351)
Package build was broken with my last commit.
This restores functional debuild/dpkg-buildpackage.
2018-06-06 14:04:33 +12:00
Scott Moser 51a7169904 tox: Support running tests and flake8 in tox.
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.

In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.

The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends).  From a clean new
container we can then do:
  apt-get install tox
  git clone ...
  tox

Also along the way:
 * adjust setup.py to only need the DistUtilsExtra during 'build'.
   This means tox usage doesn't require python3-distutils-extra.
 * drop use of lsb_release in favor of built-in parsing.
   This python module wasn't doing much.  We can parse /etc/lsb-release
   ourselves with less footprint.  Also part of the motivation for this
   is that lsb_release was not on pypi.
 * replace use of StorageInfo in test_partition.py with a FakeStorageInfo
 * .gitignore: ignore only the top level 'probert' directory so that
   we can track fake_deps/probert.
 * fix a couple escape chars, by using raw strings (r'').
 * adjust gettext to return un-modified strings rather than '_(string)',
   but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
Michael Hudson-Doyle feda622ed2 hack setup.py to avoid needing to import subiquitycore
or else build_i18n fails!
2018-05-21 10:30:17 +12:00
Dimitri John Ledkov 693f3e7c7d
Barebones i18n setup. 2017-09-18 14:14:39 +01:00
Mathieu Trudel-Lapierre 6707f8731e setup.py: update to account for subiquitycore rename 2016-07-08 15:56:50 -04:00
Adam Stokes d488a9d1fa Dont let setuptools manage scripts
We handle our scripts through the Debian packaging.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-28 14:42:19 -04:00
Adam Stokes b16374fa8e Rename to subiquity-tui for package install
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-28 11:20:22 -04:00
Adam Stokes 5ead10de47 add setuptools
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-21 14:15:04 -04:00