Closed simonTurintech closed 2 years ago
Dear Simon, Thanks for your message and your appreciation of this package. The dependencies you name are needed when testing the package, which should be possible when installing it (as an option). How would you propose to hide this dependency when not being a developer? Thanks for your appreciated reply! Franz-Benjamin
If this is indeed a requirement for developpers, when testing the application (as I expected), I know of 2 separate solutions:
As this is targeted to developpers, you can provide a separate file for requirements, for example requirements_test.txt
. You probably don't run the tests without cloning the repository first, so that makes sense.
You'd implement this solution by isolating the two test-specific line in a separate txt.
Setuptools allows you to create optional dependencies in your setup.py
. The keyword extra_requires
(see the docs, don't forget to click "setup.py") would allow you to declare an optional dependency like test
, that would be installed with pip install OSMPythonTools[test]
.
You'd implement this solution by adding a new keyword argument in setup.py
, right below install_requires
:
install_requires={
'test': ['pytest', 'pytest-sugar']
}
And of course removing those from the regular install_requires
.
If any of those two solution would work for you, I can make a PR implementing either one.
Thanks for your kind reply. I have many other tasks on my table but hope to be able to follow up soon. I prefer to have a look at the matter myself before making an informed decision.
Yes, I like your second suggestion and have implemented it. I would be delighted if you could briefly test and confirm that the version released officially can be installed with and without the test dependencies. Thank you in advance!
Hi, your release 0.3.3 is working exactly as expected! Thank you very much.
Great. Thanks for having checked!
Hi, first of all thank you very much for all your work on this package.
While insalling this package, I realised that it introduces a dependency on pytest and pytest-sugar (see this line and this line).
Are those dependencies needed for end users, or should they be distributed somewhere else for developer of this library only? I'm asking this question because installing the package produces a side-effect for me which is modifying my pytest interface.
Thank you for your time.