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

questions about dependencies #51

Open
williamh opened this issue Dec 11, 2019 · 4 comments
Open

questions about dependencies #51

williamh opened this issue Dec 11, 2019 · 4 comments

Comments

@williamh
Copy link

Hello,

I am looking at packaging this software for Gentoo Linux.

I'm a bit uncertain about how your dependencies work. I am aware of requirements.txt, but you also have requirements-unfrozen.txt, which is much shorter than requirements.txt.

In my Gentoo package, what should I list as dependencies -- everything in requirements.txt or requirements-unnfrozen.txt?

Also, can you clarify which dependencies are needed to build, run and test your package?

Thanks much,

William

@datakurre
Copy link
Collaborator

Thanks for asking!

Package requirements are specified in https://github.com/collective/sphinxcontrib-httpexample/blob/master/setup.cfg#L24 as follows

  • install_requires are run-time requirements
  • setup_requires are build-time-only requirements (when not installed from wheel)
  • test_require are test-only requirements

if there were known minimum versions for requirements, they would be in setup.cfg. Reasonable setuptools version is required to support declarative package configuration from setup.cfg.

Having pytest-runner in setup_requires used to be best practice from pytest documentation, but now I see that it has been deprecated https://pypi.org/project/pytest-runner/ so that may change in the future.

requirement*-files are only for reproducible development environment and you should ignore them in downstream packaging

requirements-unfrozen.txt has known dependencies with known required version pins to get working development environment

requirements.txt has the exact versions previously used in development to really ensure reproducible development environment

In the future, when touching this next time, I will change naming of requirement*-files somehow to have separate requirements files (both unpinned and pinned) for Python 2 and Python 3. (I'm not in hurry for breaking Python 2 compatibility).

@williamh
Copy link
Author

Ok, thanks for the info. another dependency question. It looks like upstream for simonpercivall/astunparse hasn't been touched in a year. Are you using it on python 3.6 ok, or is there another astunparse I haven't found?

@datakurre
Copy link
Collaborator

I recall the tests are being run on against 3.6.

There seems to be a newer fork, but I’m not currently able to work for switching to that https://github.com/mbdevpl/typed-astunparse

@datakurre
Copy link
Collaborator

Notes about the recent changes:

  • requirements.txt is now a shortest one, but it still contains all development dependencies; setup.cfg is still the truth for runtime dependencies

  • Python 2.7 and Python 3.9 have tested constraint files

  • also, I assume this package being broken on Python 3.7 and Python 3.8 because astunparse is probably broken on those; Python 3.9 has ast.unparse, which replaces astunparse

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

No branches or pull requests

2 participants