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

weird errors when "pip install django-salesforce" #19

Closed
beniwohli opened this issue Oct 30, 2013 · 5 comments
Closed

weird errors when "pip install django-salesforce" #19

beniwohli opened this issue Oct 30, 2013 · 5 comments

Comments

@beniwohli
Copy link
Contributor

My project layout looks something like this:

project_directory
  .git
  env       # virtualenv directory
  src       # python source files
  .gitignore
  fabfile.py
  config.ini
  requirements.txt

When I try to "pip install django-salesforce" (with activated virtualenv), I get errors like this:

 $ pip install django-salesforce
Downloading/unpacking django-salesforce
  Running setup.py egg_info for package django-salesforce
    package version: 0.2.0

Installing collected packages: django-salesforce
  Running setup.py install for django-salesforce
    package version: 0.2.0

    error: Error: setup script specifies an absolute path:

        /home/benjamin/projects/my-awesome-project/fabfile.py

    setup() arguments must *always* be /-separated paths relative to the
    setup.py directory, *never* absolute paths.

    Complete output from command /home/benjamin/projects/my-awesome-project/env/bin/python -c "import setuptools;__file__='/home/benjamin/projects/my-awesome-project/env/build/django-salesforce/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Kl93mQ-record/install-record.txt --single-version-externally-managed --install-headers /home/benjamin/projects/my-awesome-project/env/include/site/python2.7:
    package version: 0.2.0

This happens as long as there is anything in project_directory other than env. Even hidden folders and files like .git and .gitignore cause the exception above.

I'm not really grokking your setup.py, so I have no idea what causes this. But I haven't seen this error with any other package.

@sbussetti
Copy link
Contributor

This error is a mystery to me as well, though it is not only limited to django-salesforce and seems to be environment dependent as you've seen. I found an SO where someone is theorizing it's a bug in Setuptools 1.0+ http://stackoverflow.com/questions/18085571/pip-install-error-setup-script-specifies-an-absolute-path

@philchristensen
Copy link
Member

Okay, so, I think I found the issue. It's definitely a bug in setuptools; however, because we're also using setuptools_git to recognize which files need to go in the resulting build/archive, we can remove the problem line.

Basically, by removing "include_package_data=True" from setup.py (e3fd4dc) it seems to fix the issue. I was getting the same error in a fresh env, and now I'm not, so I'm hoping this works for you.

I've uploaded version v0.2.0.1 to pypi, so you should be able to just retry the install. Before doing so, I'd remove the 'build' dir that's inside your virtualenv directory, though.

@beniwohli
Copy link
Contributor Author

Awesome! I was able to install 0.2.0.1 without any issues. @philchristensen, thanks for your quick help!

@philchristensen
Copy link
Member

Great!

@mktspirit
Copy link

WOW thanks

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

No branches or pull requests

4 participants