-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyB plugins use wrong external tool dependencies #272
Comments
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
Also: Env is not inherited properly by integrationtest plugin for PyB fixes pybuilder#272, connected to pybuilder#272 fixes pybuilder#284, connected to pybuilder#284
I'm investigating why that is. |
For example » pip list | grep cram
cram (0.6) but >>> list(search_packages_info("cram"))
[] |
Ahhh. In the pip version I have, https://github.com/pypa/pip/blob/13d43e3af8b5c8e8c7c66dde8a9f76b340697c3e/pip/commands/show.py#L54 So this works: >>> list(search_packages_info(["cram"]))
[{'files': ['../../../bin/cram', 'cram-0.6.dist-info/DESCRIPTION.rst', 'cram-0.6.dist-info/METADATA', 'cram-0.6.dist-info/RECORD', 'cram-0.6.dist-info/WHEEL', 'cram-0.6.dist-info/pydist.json', 'cram-0.6.dist-info/top_level.txt', 'cram.py', 'cram.pyc'], 'name': 'cram', 'license': 'GNU GPL', 'author': 'Brodie Rao', 'metadata-version': '2.0', 'home-page': 'https://bitheap.org/cram/', 'summary': 'A simple testing framework for command line applications', 'version': '0.6', 'location': '/data/home/mriehl/workspace/pybuilder/venv/lib/python2.7/site-packages', 'requires': [], 'author-email': 'brodie@bitheap.org'}] Isn't that the case on your pip version @arcivanov ? |
@mriehl search_packages_info always works for me with an iterable query. I'm going to create a separate issue to increase plugin dependency check performance. PS: I see what you mean! Good catch! |
fixes pybuilder#293, connected to pybuilder#293, connected to pybuilder#272
Harden and optimize use of `search_packages_info` in #272
@arcivanov I think there's still an issue :/ the latest build from master installed https://travis-ci.org/pybuilder/pybuilder/jobs/95025723#L749 and https://travis-ci.org/pybuilder/pybuilder/jobs/95025723#L1443 |
Ah, looking at https://github.com/arcivanov/pybuilder/blob/da5f51009fd0df2889d9939de39e276049e386ca/src/main/python/pybuilder/pip_utils.py#L137 it seems the pip query is using the package name string as an iterable, e.G. |
@mriehl at https://github.com/arcivanov/pybuilder/blob/da5f51009fd0df2889d9939de39e276049e386ca/src/main/python/pybuilder/pip_utils.py#L137 we now always have a collection there (as_list(mixed)), no? |
Yes, that's right.. I'm not sure why travis installs plugin runtime dependencies twice then. Will investigate tomorrow morning |
I'm investigating already, don't worry about it. I suspect this is related to how pip is implemented and that it doesn't actually refresh internal package cache every time running in-process. |
@mriehl yep, it's internal pip implementation
for code
|
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
fixes pybuilder#295, connected to pybuilder#295, connected to pybuilder#272, connected to pybuilder#293
Yup works great now! Thanks 👍 |
Throughout the PyB internal plugins use
project.build_depends_on
:Firstly, PyB build does not really depend on those. It's the runtime use of the plugin that requires these external tools.
Therefore, I propose the following:
project.plugin_depends_on(package_name, version_spec=None, external_tool=None)
package_name
is package name 😄version_spec
, if specified is a required PEP0440 SpecifierSet (see Plugin-specified PyB API version constraints #271)external_tool
if specified is then name of the executable to check withassert_can_execute
project.plugin_depends_on
will:pip show <package_name>
check the version of the package installedpip install <package_name>[version_spec]
will be executedversion_spec
is specified and version is not contained in SpecifierSetpip install --upgrade <package_name>[version_spec]
will be runexternal_tool
is specified theassert_can_execute
will be performed.@mriehl @esc review please
The text was updated successfully, but these errors were encountered: