Skip to content
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

Can zc.recipe.egg's working_set factor in the [versions] config section? #540

Open
grant-humphries opened this issue Oct 19, 2020 · 1 comment
Labels

Comments

@grant-humphries
Copy link

Hi folks,

I have a recipe that uses the working_set method from zc.recipe.egg. In this recipe I fetch the file paths for all of the packages picked by Buildout via the working_set method and write them to a file. Here is a simplified version of the Buildout config that I'm working with:

[buildout]
parts = deploy

[deploy]
recipe = my.recipe.deploy
eggs = 'my.app==2.0.0'

[versions]
sqlalchemy = 1.0.2

Under this scenario sqlalchemy is a requirement of my.app and assume that SQLAlchemy 1.1.0 installed on the python instance with which Buildout is being run. When buildout is executed, SQLAlchemy 1.0.2 is fetched and written to the eggs folder, but within the recipe the output of working_set has the 1.1.0 instance of SQLA, so it seems that the versions config is not being taken into account.

Is there a way to get working_set to honor the versions specified in the Buildout config? Or is there a different way to get the file paths for the packages picked by Buildout within a recipe?

@grant-humphries grant-humphries changed the title Can working_set factor in the [versions] config section? Can zc.recipe.egg's working_set factor in the [versions] config section? Oct 19, 2020
@gotcha
Copy link
Member

gotcha commented Mar 7, 2021

Did you check/debug into zc.buildout.easy_install.scripts ? That might help you to understand when/how the versions data is used.

Version constraints are applied through calls to zc.buildout.easy_install._constrained_requirement.

Good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants