Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make setup.py install work in a fresh virtualenv #446

Merged
merged 1 commit into from
Mar 5, 2014

Conversation

gthb
Copy link
Contributor

@gthb gthb commented Feb 20, 2014

i.e. without dependencies already installed.

i.e. without dependencies already installed.
@smari
Copy link
Contributor

smari commented Mar 5, 2014

This is a bit of a dirty hack. Can you explain how it is useful? :-)

@gthb
Copy link
Contributor Author

gthb commented Mar 5, 2014

It fixes the problem that setup.py currently can't install Mailpile's dependencies unless they are already installed. : )

Specifically, this import:

from mailpile.defaults import APPVER

includes importing mailpile, which in turn imports other modules under mailpile, which fails if dependencies are not installed.

Alternative ways to fix this include:

  1. maintaining APPVER in two places (in setup.py and in application code) and keeping them in sync manually
  2. frobnicating imports so that the module containing the version can be imported without that cascading to importing all the rest
  3. (just found this one): maintaining the version only in setup.py, and reading it in the application using pkg_resources. See http://stackoverflow.com/a/17638236/74683

That last one is probably fine (I haven't done it), in which case this pull request can be scrapped.

@smari
Copy link
Contributor

smari commented Mar 5, 2014

Okay. Will merge this for now, but I think the pkg_resources approach might be better - or having some external file that contains version info...

smari pushed a commit that referenced this pull request Mar 5, 2014
Make setup.py install work in a fresh virtualenv
@smari smari merged commit c401344 into mailpile:master Mar 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants