Experiment with virtualenv based packaging in the petmail style. #2255

Closed
opened 2014-07-02 02:10:18 +00:00 by nejucomo · 7 comments
No description provided.
nejucomo added the
unknown
normal
defect
1.10.0
labels 2014-07-02 02:10:18 +00:00
nejucomo added this to the undecided milestone 2014-07-02 02:10:18 +00:00
Author

Some notes on how nejucomo generated ./requirements.txt:

  1. Edited ./setup.py to rename support to legacysupport.
  2. renamed support to legacysupport in .gitignore.
  3. recursively copied ./support from petmail
  4. spliced in the SafeDevelop and run_command from petmail, but renamed the latter to avoid a collision from default tahoe setup.py.
  5. Ran python ./setup.py safe_develop mainly to initialize ./venv (but perhaps it would be simpler to run python ./support/virtualenv.py ./venv)
  6. Ran ./venv/bin/pip install . to use the existing ./setup.* to install dependencies into the new ./venv.
  7. Generated requirements.txt using the existing ./venv by running ./venv/bin/python ./venv/bin/peep.py freeze > ./requirements.txt
  8. manually removed wsgiref and allmydata-tahoe from requirements.txt
  9. deactivated ./venv then ran python ./setup.py safe_develop to trigger peep's display of package hashes.
  10. overwrote requirements.txt with the output of peep.
Some notes on how nejucomo generated `./requirements.txt`: 1. Edited `./setup.py` to rename `support` to `legacysupport`. 1. renamed `support` to `legacysupport` in `.gitignore`. 1. recursively copied `./support` from petmail 1. spliced in the `SafeDevelop` and `run_command` from petmail, but renamed the latter to avoid a collision from default tahoe `setup.py`. 1. Ran `python ./setup.py safe_develop` mainly to initialize `./venv` (but perhaps it would be simpler to run `python ./support/virtualenv.py ./venv`) 1. Ran `./venv/bin/pip install .` to use the existing `./setup.*` to install dependencies into the new `./venv`. 1. Generated `requirements.txt` using the existing `./venv` by running `./venv/bin/python ./venv/bin/peep.py freeze > ./requirements.txt` 1. manually removed `wsgiref` and `allmydata-tahoe` from `requirements.txt` 1. deactivated `./venv` then ran `python ./setup.py safe_develop` to trigger peep's display of package hashes. 1. overwrote `requirements.txt` with the output of peep.
Author

I've just pushed an implementation of the above steps to https://github.com/nejucomo/tahoe-lafs/commits/2255-virtualenv-packaging.messy

I've just pushed an implementation of the above steps to <https://github.com/nejucomo/tahoe-lafs/commits/2255-virtualenv-packaging.messy>
Author

Warner has an independent implementation of this approach which was created in "parallel sprint race mode": https://github.com/warner/tahoe-lafs/tree/venv

That implementation was more liberal in hacking out most of ./setup.py.

Warner has an independent implementation of this approach which was created in "parallel sprint race mode": <https://github.com/warner/tahoe-lafs/tree/venv> That implementation was more liberal in hacking out most of `./setup.py`.
daira commented 2014-07-24 01:17:14 +00:00
Owner

So, I see how this works for source packages, or if the requirements.txt is created on the same platform as the build in the virtualenv. I don't see how it works for binary eggs -- wouldn't we need to ship different requirements.txt files for each platform, containing different hashes?

Perhaps it is sufficient to have a requirements.txt for Windows 32-bit w/ Python 2.7, one for Windows 64-bit w/ Python 2.7, and one for every other platform that assumes a compiler and builds everything from source?

So, I see how this works for source packages, or if the `requirements.txt` is created on the same platform as the build in the virtualenv. I don't see how it works for binary eggs -- wouldn't we need to ship different `requirements.txt` files for each platform, containing different hashes? Perhaps it is sufficient to have a `requirements.txt` for Windows 32-bit w/ Python 2.7, one for Windows 64-bit w/ Python 2.7, and one for every other platform that assumes a compiler and builds everything from source?
tahoe-lafs added
packaging
and removed
unknown
labels 2014-07-29 21:00:02 +00:00
tahoe-lafs modified the milestone from undecided to 1.12.0 2014-07-29 21:00:02 +00:00
daira commented 2014-08-19 17:47:06 +00:00
Owner

See also #2077 (pip packaging plan).

See also #2077 (pip packaging plan).

Milestone renamed

Milestone renamed
warner modified the milestone from 1.12.0 to 1.13.0 2016-03-22 05:02:25 +00:00

We've switched to virtualenv-based installation. Not quite in the style that Nathan and I were exploring (where a new command creates+populates a virtualenv for you), but I think the existing #2055 build-it-safely ticket can cover the distance between what we've got now (virtualenv; pip install) and a peep/requirements.txt -based safe-build step on top of it. So I think we can close this one out.

We've switched to virtualenv-based installation. Not quite in the style that Nathan and I were exploring (where a new command creates+populates a virtualenv for you), but I think the existing #2055 build-it-safely ticket can cover the distance between what we've got now (virtualenv; pip install) and a peep/requirements.txt -based safe-build step on top of it. So I think we can close this one out.
warner added the
fixed
label 2016-03-26 23:14:58 +00:00
warner modified the milestone from 1.13.0 to 1.11.0 2016-03-26 23:14:58 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2255
No description provided.