Taskotron checks regarding Python versions
Project description
This represents the automatic checks happening in the Fedora infrastructure after any package is built.
Currently the following checks are available:
Whether a package does not require Python 2 and Python 3 at the same time;
Whether the package name follows the Python package naming scheme;
Whether the package uses versioned Python prefix in requirements’ names;
Whether only Python 2 version of the package contains the executables;
Whether the package uses versioned shebangs in its executables;
Whether the package supports Python 3 upstream but not in the package;
Whether the package requires /usr/bin/python (or python-unversioned-command).
Running
To run this task locally, execute the following command as root (don’t do this on a production machine!):
$ ansible-playbook tests.yml -e taskotron_item=<nevr>
where nevr is a Koji build name-(epoch:)version-release identifier.
For example:
$ ansible-playbook tests.yml -e taskotron_item=python-gear-0.11.0-1.fc27
You can see the results in ./artifacts/ directory.
You can also run the above in mock:
$ mock -r ./mock.cfg --init $ mock -r ./mock.cfg --copyin taskotron_python_versions *.py tests.yml / $ mock -r ./mock.cfg --shell 'ansible-playbook tests.yml -e taskotron_item=python-gear-0.11.0-1.fc27' $ mock -r ./mock.cfg --copyout artifacts artifacts
Tests
This task is covered with functional and integration tests. You can run them using tox, but you will need mock, python3-rpm and python3-dnf installed. For mock configuration see mock setup instructions. Use the following command to run the test suite:
$ tox
The integration tests may take a while to execute, as they are running real tasks in mock. However, for development you may speed them up by reusing the results of the previous test run. This is useful if you modify the test itself, without changing the implementation of task checks. Use the following command to run integration tests in a fake mode:
$ tox -e integration -- --fake
The tests are also being executed on Travis CI. Since Travis CI runs on Ubuntu and Ubuntu lacks the RPM Python bindings and mock, Docker is used to run the tests on Fedora. You can run the tests in Docker as well, just use the commands from the .travis.yml file.
License
This code has been dedicated to the Public Domain, it is licensed with CC0 1.0 Universal Public Domain Dedication, full text of the license is available in the LICENSE file in this repository.
Please note that the RPM packages in this repository used for testing have their own license terms and are not dedicated to the Public Domain.
The sources of those packages can be found in Koji by searching the package name and selecting the appropriate version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file taskotron-python-versions-0.1.dev5.tar.gz
.
File metadata
- Download URL: taskotron-python-versions-0.1.dev5.tar.gz
- Upload date:
- Size: 6.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07139a3105a0d2b0011e65fece9dd61ce8918c8019a6d8a8a2a74154e3268b1f |
|
MD5 | 282d7ccb43a581657a303ce9f981a104 |
|
BLAKE2b-256 | e63af3982594e2892edd96e29177b75686fa58f306171b6df2c1654b9eaa55bb |
File details
Details for the file taskotron_python_versions-0.1.dev5-py3-none-any.whl
.
File metadata
- Download URL: taskotron_python_versions-0.1.dev5-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10b98f7aa4d22fb05aad9448a2ff77a196620253b54d1d73506df9c8e1ac78ce |
|
MD5 | 79d0f4d5406e062c7e9e2c17acb66600 |
|
BLAKE2b-256 | 3519cc34a4875875892f6ba178b24a396de419dc7e5ad3b2b9ea7d23e1bfa437 |