#
fa435db8 |
| 24-Feb-2022 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging
Python patches
New functionality in qmp-shell from Dan, and some packaging fixes.
# gpg: Signature made We
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging
Python patches
New functionality in qmp-shell from Dan, and some packaging fixes.
# gpg: Signature made Wed 23 Feb 2022 22:08:35 GMT # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jsnow-gitlab/tags/python-pull-request: MAINTAINERS: python - remove ehabkost and add bleal Revert "python: pin setuptools below v60.0.0" Python: add setuptools v60.0 workaround Python: discourage direct setup.py install python: support recording QMP session to a file python: introduce qmp-shell-wrap convenience tool
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
2ddaeb7b |
| 07-Feb-2022 |
John Snow <jsnow@redhat.com> |
Python: discourage direct setup.py install
When invoking setup.py directly, the default behavior for 'install' is to run the bdist_egg installation hook, which is ... actually deprecated by setuptoo
Python: discourage direct setup.py install
When invoking setup.py directly, the default behavior for 'install' is to run the bdist_egg installation hook, which is ... actually deprecated by setuptools. It doesn't seem to work quite right anymore.
By contrast, 'pip install' will invoke the bdist_wheel hook instead. This leads to differences in behavior for the two approaches. I advocate using pip in the documentation in this directory, but the 'setup.py' which has been used for quite a long time in the Python world may deceptively appear to work at first glance.
Add an error message that will save a bit of time and frustration that points the user towards using the supported installation invocation.
Reported-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Message-id: 20220207213039.2278569-1-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
#
49ba51ad |
| 02-Jun-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging
Pull request
V2: - Squashed in fixup for 'Python: add utility function for retrieving port redirection'
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging
Pull request
V2: - Squashed in fixup for 'Python: add utility function for retrieving port redirection' - Rebased on today's upstream
CI here: https://gitlab.com/jsnow/qemu/-/pipelines/313202814
# gpg: Signature made Wed 02 Jun 2021 00:29:55 BST # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jsnow-gitlab/tags/python-pull-request: (44 commits) gitlab: add python linters to CI python: add tox support python: add .gitignore python: add Makefile for some common tasks python: add avocado-framework and tests python: add devel package requirements to setuptools python/qemu: add qemu package itself to pipenv python/qemu: add isort to pipenv python: move .isort.cfg into setup.cfg python: add mypy to pipenv python: move mypy.ini into setup.cfg python: Add flake8 to pipenv python: add excluded dirs to flake8 config python: move flake8 config to setup.cfg python: add pylint to pipenv python: move pylintrc into setup.cfg python: add pylint import exceptions python: Add pipenv support python: add MANIFEST.in python: add directory structure README.rst files ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
ea1213b7 |
| 27-May-2021 |
John Snow <jsnow@redhat.com> |
python: add qemu package installer
Add setup.cfg and setup.py, necessary for installing a package via pip. Add a ReST document (PACKAGE.rst) explaining the basics of what this package is for and who
python: add qemu package installer
Add setup.cfg and setup.py, necessary for installing a package via pip. Add a ReST document (PACKAGE.rst) explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI.
List the subpackages we intend to package by name instead of using find_namespace because find_namespace will naively also packages tests, things it finds in the dist/ folder, etc. I could not figure out how to modify this behavior; adding allow/deny lists to setuptools kept changing the packaged hierarchy. This works, roll with it.
I am not yet using a pyproject.toml style package manifest, because "editable" installs are not defined (yet?) by PEP-517/518.
I consider editable installs crucial for development, though they have (apparently) always been somewhat poorly defined.
Pip now (19.2 and later) now supports editable installs for projects using pyproject.toml manifests, but might require the use of the --no-use-pep517 flag, which somewhat defeats the point. Full support for setup.py-less editable installs was not introduced until pip 21.1.1: https://github.com/pypa/pip/pull/9547/commits/7a95720e796a5e56481c1cc20b6ce6249c50f357
For now, while the dust settles, stick with the de-facto setup.py/setup.cfg combination supported by setuptools. It will be worth re-evaluating this point again in the future when our supported build platforms all ship a fairly modern pip.
Additional reading on this matter:
https://github.com/pypa/packaging-problems/issues/256 https://github.com/pypa/pip/issues/6334 https://github.com/pypa/pip/issues/6375 https://github.com/pypa/pip/issues/6434 https://github.com/pypa/pip/issues/6438
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-id: 20210527211715.394144-11-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|