Closed tasn closed 5 years ago
It is now possible to integrate pynsist into a build script that uses pip to fetch requirements and then the local wheels option to include them, using a glob pattern to avoid listing them again.
You could also use the Python api to pass the list of requirements in.
I'm reluctant to parse requirements.txt first because I don't like having lots of ways to achieve the same thing, and second because people would then ask for it to support everything pip allows in that file, which I don't want to do.
Setup.py can be arbitrary code, so parsing it is definitely off the table.
On Wed, 6 Mar 2019, 14:07 Tom Hacohen, notifications@github.com wrote:
They way it's currently implemented forces people to duplicate the requirements list which can lead to annoying inconsistencies at worst and duplication of work at best. It'd be great to have a pypi_wheels_file setting that will make it possible to just load the dependencies from file. Another alternative is support automatic parsing of setup.py which again, already includes this information (if exists).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/takluyver/pynsist/issues/180, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9R6P_RRwCkJeR5yfDPgE-i6jjR0aks5vT72JgaJpZM4bg1ji .
Feel free to close this ticket then. Though maybe consider documenting the above...
Thanks!
Thanks!
The local wheels option is documented here: https://pynsist.readthedocs.io/en/latest/cfgfile.html#include-section
And the Python API is documented here: https://pynsist.readthedocs.io/en/latest/api/main.html
Is there anything particular that's not clear from those?
It's clear when you know what to look for and read this specific section back-to-back, it's not clear for a newcomer, especially one evaluating the project. :) A note/section in the README would probably be useful.
I'll add a generic note to the README that there are more powerful options available, but I don't know any good way to make specific details like this highly visible. This is what's important to you, but someone else will care about something else, and if I add them all to the README, it's too long and no-one reads it.
Still a bit vague if you ask me, though I agree with your point about "important to you may not be important to others".
A quick anecdote on my end: I was evaluating PyInstaller and PyNsist. I know they don't do exactly the same thing, but for my goal (making life easier for Windows users), they were serving the same purpose. Anyhow, I took a look at PyNsist, saw that I'd have to duplicate my deps (no thanks, already in my setup.py and requirements, enough is enough) looked in the docs and couldn't easily find anything, so I opened this ticket and gave up on this project. I'm now using PyInstaller.
I know it's just an anecdote, but even with the added note, I'm not going to read through all the docs hoping to find the ability to change something that looks rigid in a project I don't use, so I'll just move on.
I'm not heavily invested in this, as I said, I'm not even a user, just wanted to share my user experience and why I'm not using it in the end.
Fair enough, thanks for describing your experience.
They way it's currently implemented forces people to duplicate the requirements list which can lead to annoying inconsistencies at worst and duplication of work at best. It'd be great to have a pypi_wheels_file setting that will make it possible to just load the dependencies from file. Another alternative is support automatic parsing of setup.py which again, already includes this information (if exists).