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

Incomplete package install #32

Closed
madig opened this issue Nov 24, 2019 · 15 comments
Closed

Incomplete package install #32

madig opened this issue Nov 24, 2019 · 15 comments
Labels
bug Something isn't working

Comments

@madig
Copy link

madig commented Nov 24, 2019

  1. Create a new project
  2. Run pyflow install ufolib2
$ pyflow install ufolib2
Found lockfile
⬇ Installing ufolib2 0.5.1 ...
⬇ Installing attrs 19.3.0 ...
Installation complete

It should also install fonttools, see https://github.com/fonttools/ufoLib2/blob/master/setup.cfg. Not sure what's going on there.

@David-OConnor David-OConnor added the bug Something isn't working label Nov 25, 2019
@David-OConnor
Copy link
Owner

David-OConnor commented Nov 25, 2019

The requirement is listed as "fonttools[ufo] (>=3.34.0)" on Pypi. I'm not sure what the brackets and ufo mean, but this is a bug with parsing this format. Need to figure out what that means before proceeding.

If unable to determine, perhaps the answer is to ignore anything in brackets, and install the package instead of silently failing to parse it.

edit: https://stackoverflow.com/questions/46775346/what-do-square-brackets-mean-in-pip-install I'm still not sure what this means, ie if we need to do anything beyond ignore the brackets and install fonttools.

@David-OConnor
Copy link
Owner

Fixed in latest commit.

@madig
Copy link
Author

madig commented Nov 25, 2019

Well, brackets are the features = [...] of the Python world, so they should not be ignored 😁 In this case, the ufo feature is required to make ufoLib2 work at all.

One complication is that features must be union'd together across the dependecy graph. Say package1 depends on fonttools and package2, which in turn depends on fonttools[ufo].

@David-OConnor
Copy link
Owner

David-OConnor commented Nov 27, 2019

Latest commit handles this.

@madig
Copy link
Author

madig commented Nov 27, 2019

Just installed git master and tried pyflow install ufolib2 again and it doesn't install fonttools?

@David-OConnor
Copy link
Owner

David-OConnor commented Nov 27, 2019

Try removing pyflow.lock, or running pyflow reset. I suspect this is due to the incorrect dependencies having been locked from the prev version.

@madig
Copy link
Author

madig commented Nov 30, 2019

Nope, this is with a freshly init'd project.

@David-OConnor
Copy link
Owner

David-OConnor commented Nov 30, 2019

What OS and Python version? Could you please post your pyproject.toml?

@madig
Copy link
Author

madig commented Nov 30, 2019

Fedora 31 x86_64, Python 3.7.5.

[tool.pyflow]
name = ""
py_version = "3.7"
version = "0.1.0"
authors = ["Nikolaus Waxweiler <madigens@gmail.com>"]


[tool.pyflow.scripts]


[tool.pyflow.dependencies]
ufolib2 = "^0.5.1"


[tool.pyflow.dev-dependencies]

@David-OConnor
Copy link
Owner

Ahh - I think I'm having it treat it as only install fonttools if ufo is passed as an extra, when it should be install fontools with the ufo extra.

@madig
Copy link
Author

madig commented Nov 30, 2019

Yes, it should be the latter. During resolving, features need to be union'd for each package 😃

@David-OConnor
Copy link
Owner

Fixed, and released in 0.2.3. Apparently the infrastructure for this was there; just needed to swap a field name.

@madig
Copy link
Author

madig commented Dec 3, 2019

It werks now! Thanks for your effort 😃

@madig madig closed this as completed Dec 3, 2019
@madig
Copy link
Author

madig commented Dec 3, 2019

Hm, actually. If I pyflow install ufoLib2 and then add fonttools = {version = "^4.2.0", extras = ["ufo", "lxml", "unicode"]} to the pyproject.toml file and pyflow install, nothing happens. ufoLib2 only depends on fonttools[ufo], my explicit request for ["ufo", "lxml", "unicode"] should update the feature list that is ultimately installed for the project. New issue?

@David-OConnor
Copy link
Owner

Yep; new!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants