Age | Commit message (Collapse) | Author |
|
Since upstream cloud-init has dropped python2 support,
adapt remaining package build scripts and tools to python3 only
Changes:
* Do not template debian/rules as python3 is the only supported version
* Drop six from requirements.txt
* Makefile: drop everything related to Python 2
* run-container: install the CI deps only on ubuntu|debian
* read-version: update the shebang to use Python 3
* brpm: read_dependencies(): drop unused argument
* read-dependencies: switch to Py3 and drop the --python-version option
* pkg-deps.json: drop the Python version field and update the redhat deps
* pkg-deps.json: drop the unittest2 and contextlib2 renames
* Update RPM the spec file to use Python 3 when building the RPM
* bddeb: drop support for Python 2
|
|
As the nose docs[0] themselves note, it has been in maintenance mode for the past several years. pytest is an actively developed, featureful and popular alternative that the nose docs themselves recommend. See [1] for more details about the thinking here.
(This PR also removes stale tox definitions, instead of modifying them.)
[0] https://nose.readthedocs.io/en/latest/
[1] https://lists.launchpad.net/cloud-init/msg00245.html
|
|
Remove pyc files, .tox directories and docs during make clean.
|
|
* Create makefile and tox targets for documentation building and testing
to better replicate the live web docs using the same theme.
* Created docs.rst to explain how to build and contribute to documentation
with style guide and tips.
* doc/rtd/conf.py:
* Add copyright to rtd config
* Use Sphinx's RTD theme to replicate actual docs
|
|
The package cloudinit was sparsely added to only the makefile's unittest
target and tox's py3 target. This branch adds cloudinit package to 'make
unittest3' and all tox environments. It tweaks one cloudinit unit test to
use mocked_object.call_count instead of mocked_object.assert_called_once
which is not defined in some python unittest versions.
|
|
The bin/ dir was deleted some time ago, but the Makefile was still
searching for files down it. This didn't cause any problems other Than a
wierd looking error message in a build log.
|
|
This branch adds cloudinit-analyze into cloud-init proper. It adds an
"analyze" subcommand to the cloud-init command line utility for quick
performance assessment of cloud-init stages and events.
On a cloud-init configured instance, running "cloud-init analyze blame"
will now report which cloud-init events cost the most wall time. This
allows for quick assessment of the most costly stages of cloud-init.
This functionality is pulled from Ryan Harper's analyze work.
The cloudinit-analyze main script itself has been refactored a bit for
inclusion as a subcommand of cloud-init CLI. There will be a followup
branch at some point which will optionally instrument detailed strace
profiling, but that approach needs a bit more discussion first.
This branch also adds:
* additional debugging topic to the sphinx-generated docs describing
cloud-init analyze, dump and show as well as cloud-init single usage.
* Updates the Makefile unittests target to include cloudinit directory
because we now have unittests within that package.
LP: #1709761
|
|
Remove errant hyphen in read-dependencies --distro ubuntu parameter for ci-deps-ubuntu.
All system packages can now be installed for ubuntu with make ci-deps-ubuntu".
[author: powersj, review:blackboxsw]
|
|
read-dependencies now takes --test-distro param to indicate we want to install
all system package depenencies to allow for testing and building for our
continous integration environment. It allows us to install all needed deps on
a fresh system with:
python3 ./tools/read-dependencies --distro ubuntu --test-distro [--dry-run].
Additionally read-dependencies now looks at what version of python is running
the script (py2 vs p3) and opts to install python 2 or 3 system deps
respectively. This behavior can still be overridden with
python3 ./tools/read-dependencies ... --python-version 2.
There are also some distro-specific packaging and test dependencies, like
devscripts, tox and libssl-dev on debian or ubuntu. Those pkg dependencies
have now been broken out from common pkg deps to avoid trying to install them
on centos/redhat/suse.
|
|
This change adds a couple of makefile targets for ci environments to
install all necessary dependencies for package builds and test runs.
It adds a number of arguments to ./tools/read-dependencies to facilitate
reading pip dependencies, translating pip deps to system package names and
optionally installing needed system-package dependencies on the local
system. This relocates all package dependency and translation logic into
./tools/read-dependencies instead of duplication found in packages/brpm
and packages/bddeb.
In this branch, we also define buildrequires as including all runtime
requires when rendering cloud-init.spec.in and debian/control files
because our package build infrastructure will also be running all unit
test during the package build process so we need runtime deps at build
time.
Additionally, this branch converts
packages/(redhat|suse)/cloud-init.spec.in from cheetah templates to jinja
to allow building python3 envs.
|
|
Here we move the config/cloud.cfg to be rendered as a template.
That allows us to maintain deltas between distros in one place.
Currently we use 'variant' variable to make decisions.
A tools/render-cloudcfg is provided to render the file.
There were changes to setup.py, MANIFEST.in to allow us to put all
files into a virtual env installation and to render the cloud-config
file in 'install' or 'bdist' targets.
We have also included some config changes that were found in the
redhat distro spec.
* include some config changes from the redhat distro spec.
The rendered cloud.cfg has some differences.
Ubuntu: white space and comment changes only.
Freebsd:
- whitespace changes and comment changes
- datasource_list definition moved to be closer to 'datasource'.
- enable modules: migrator, write_files
- move package-update-upgrade-install to final.
The initial work was done by Josh Harlow.
|
|
This just adds targets for deb-src and srpm, and uses
PYVER anywhere where we run a python program.
|
|
Fix detection of python in a non-python3 environment.
The old path always used python3. The 2 fixes here are:
a.) escape the '$' before the subshell.
b.) use shell builtin 'command -v' rather than 'which' in case
'which' is not available.
|
|
Add a simple dependency check to "make deb" target for devscripts. Rework
a bit of the logic in package/bddeb to drop superfluous STD_NAMED_PACKAGES
to avoid duplication of requirements already listed in
(test-)?requiremets.txt. All "standard" packages can be assumed to have
either python3- or python- prefix if not listed in NONSTD_NAMED_PACKAGES.
This branch also moves logic inside write_debian_folder which is unneeded
up in main.
LP: #1685935
|
|
- make check will no longer run the style checks, that way package builds
wont fail on a style difference in versions of the style tools in
that distro.
- created style-check make file target to continue to run pep8 and pyflakes
- added tox envs 'tip-pycodestyle' and 'tip-pyflakes' to run latest style
checking. These are not enabled by default run of tox.
LP: #1652329
|
|
running 'make' on a git branch other than master would fail with
complaint that the tools/read-version reported a different version
than the code.
Change to only consider tags starting with 0-9 in read-version.
|
|
The change here is to use '/usr/bin/env python' in validate-yaml.py
as all other tools/*.py do.
Additionally, change the Makefile to invoke validate-yaml.py with
the python that it has selected for other things (PYVER).
|
|
Modification of the tarball became problematic, as it meant that
any tool extracting source would find the orig source tarball different.
I found this unusable when trying to use 'gbp buildpackage'.
Other changes here are to better support using python3 or python2
for the build. Makefile will try to call the right python version
and can be told which python to use.
read-version: by adding 'tiny_p' and avoiding the import of
cloudinit.util, we need less dependencies to run this.
|
|
Update make check target to run pep8 and run pyflakes or pyflakes3
depending on the value of 'PYVER'. This way the python3 build
environment does not need python2 and vice versa.
Also have make check run the 'yaml' test.
tox: have tox run pep8 in the pyflakes
|
|
Update make check target to use pep8, pyflakes, pyflakes3.
|
|
Now we can run make check to assess pep8, pyflakes for python2 or 3
And execute unittests via nosetests (2 and 3).
|
|
|
|
Run a check of pep8, pyflakes (py27), pyflakes3 (py34), and use
nosetest and nosetest3 to run unittests. We should pass all of these.
|
|
|
|
this makes 'make' run pyflakes, so failures there will stop a build.
also adds it to tox.
|
|
|
|
This just removes comments '# pylint:' things and other code
remnents of pylint.
|
|
pylint was not passing, and per smoser in IRC pylint can/should be
removed.
|
|
This splits up 'Requires' into requirements.txt and test-requirements.txt
to differenciate the build dependencies and runtime dependencies.
one sticky thing still exists in that the packages/bddeb doesn't:
- list any Build-Depends
- address versions in the requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and fix the cases where the cc yaml
is not correct.
|
|
|
|
1. Remove the usage of the path.join function
now that all code should be going through
the util file methods (and they can be
mocked out as needed).
2. Adjust all occurences of the above join
function to either not use it or replace
it with the standard os.path.join (which
can also be mocked out as needed)
3. Fix pylint from complaining about the
tests folder 'helpers.py' not being found
4. Add a pylintrc file that is used instead
of the options hidden in the 'run_pylint'
tool.
|
|
'make pylint' was not checking tests and tools.
This fixies a bunch of pylint/pep8 issues in that code.
It also enables 'make pylint' to check them.
|
|
'cd packages && ./bddeb' is no longer necessary.
|
|
|
|
a. This allows them to be run as different tools (if desired)
2. Adjust the makefile to have a 'make pep8' section which can run this new script
|
|
|
|
|
|
cloud.log file (helpful for testing)
|
|
|
|
python files
|
|
|
|
Add initial tests for mergedict.
|