di / pytest-reqs

py.test plugin for checking requirements files
https://pypi.org/p/pytest-reqs
MIT License
25 stars 6 forks source link

Support environment markers in requirements files #16

Open jayvdb opened 6 years ago

jayvdb commented 6 years ago

This plugin will cause a failure on Python 3.4 when for requirement.txt entry like

pytest-new-feature; python_version >= '3.5'
di commented 6 years ago

Thanks @jayvdb. Indeed, pytest-reqs currently doesn't do any checks around the Python version.

I've marked this as a bug, any interest in trying to fix it?

jayvdb commented 6 years ago

I'm a bit stretched atm. I've informed the @coala GSoC students about this. Hopefully one of them is courageous.

di commented 6 years ago

Glad to help give some guidance where needed.

jayvdb commented 6 years ago

https://github.com/jayvdb/coverage_env_plugin is an example of how to get the correct values for an environment.

There is probably an easier method in packaging that can be used to do the comparison.

jayvdb commented 6 years ago

coala will also need support for platform_system == 'Windows' https://www.python.org/dev/peps/pep-0496/ is the relevant spec.

jayvdb commented 6 years ago

And we also need support for git+ vcs links with #egg=. Some issues found at https://gitlab.com/coala/mobans/issues/44

jayvdb commented 6 years ago

Clarifying...offtopic slightly again, I believe support exists for vcs links, however it fails on coala's tests when the version contains a suffix like .dev123 https://travis-ci.org/jayvdb/coala-bears/jobs/402542969#L3559 Our suffixes might need to be adjusted to be acceptable with pip & setuptools, etc.