benoitc / gunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
http://www.gunicorn.org
Other
9.83k stars 1.75k forks source link

How to install gunicorn with tar.gz instead of whl #3316

Open kelvinou opened 4 days ago

kelvinou commented 4 days ago

My friend. I face some question when use gunicorn, it conflict with others code that same use argparse module.

For example, [gunicorn -c config.py hello:app] hello.py - call abc.py abc.py have argparse param like --size --stride

[gunicorn -c config.py hello:app] occurs error: unrecognized arguments

So i want to recompile source code gunicorn.tar.gz, like: pip install gunicorn-23.0.0.tar.gz but setup.py not exists. Could you provide other methods to solve the argparse conflict issue, or provide a method for installing tar.gz Thanks.

benoitc commented 4 days ago

you need need to use the toml file to install https://til.simonwillison.net/python/pyproject. I recognize this "modern" way is quite inconvenient . I am cooking a new release of gunicorn for a release this month, I may reintroduce a simpler way.

pajod commented 3 days ago

You may not need modification. Gunicorn does not require arguments. It defaults to reading from gunicorn.conf.py - you can put your settings there, then you can call gunicorn with blank args.

Also, if you are trying something new on a supported platform and pip does not install the .tar.gz just fine, please clarify what exactly you are trying (and which versions of setuptools and pip), and what the message is. A setup.py file should be needed only for backwards compatibility. If you indeed need it now, something unusual is going on that should be looked into.