facebookincubator / xar

executable archive format
Other
1.57k stars 55 forks source link

Do you need a setup.py file to use this? #27

Closed timabbott closed 5 years ago

timabbott commented 5 years ago

I'd like to use Xar to improve the import-time performance of Zulip, but we don't have a setup.py file with a fixed set of executables. Instead, we have a requirements.txt file for our standard virtualenv, and individual command source it and then use it.

There's only 2-3 entry points that we really care about (e.g. the Django standard manage.py that you mention in your benchmarks is one), so it'd be fine if we need to list the entrypoints, but I can't figure out from your documentation how to create a xar archive for such a command without first creating a setup.py file.

cooperlees commented 5 years ago

We've only tested and made it work with setup.py/cfg.

I'd reccomened making setup.py open() your requirements.txt and have it load it's install_requires option in the setup.py. Here is an example I've tried in the past with another project: https://github.com/pypa/bandersnatch/commit/93d0b2c7a4bae637c31e26e510f643f6d37c636a

It ended up not being desirable for bandersnatch, but it does work. This with entrypoints should get you potentially working I feel - You may need a xar for each entry point tho or to make them sub commands of one entrypoint. A XAR can only have 1 entrypoint.

timabbott commented 5 years ago

OK, we'll give it a try and report back on the results.

cooperlees commented 5 years ago

Please reopen if you're still having issues.