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

Fix #15 - installing from pip and easy_install #20

Merged
merged 1 commit into from
Mar 27, 2016

Conversation

ccpost
Copy link
Contributor

@ccpost ccpost commented Mar 27, 2016

  • Ensure that the build_ext task is called to generate SWIG .py files
    before the Python copy step happens and we miss packaging and
    installing the generated files.
  • Wrap the install command for use with pip. This is a bit of a
    hack because setuptools looks at the stack frame to determine if it
    was called from the setup function, and wrapping it would break that
    behavior.
  • Wrap the bdist_egg command for use with easy_install.

Bear in mind that I'm no setuptools / distutils expert. This is the combined result of a bunch of Googling and some source diving into setuptools / distutils. Interesting references about this problem include:
http:https://stackoverflow.com/questions/10559589/adding-output-file-to-python-extension
http:https://stackoverflow.com/questions/29477298/setup-py-run-build-ext-before-anything-else
http:https://bugs.python.org/issue7562
http:https://stackoverflow.com/questions/12491328/python-distutils-not-include-the-swig-generated-module
http:https://stackoverflow.com/questions/17666018/using-distutils-where-swig-interface-file-is-in-src-folder/26556654#26556654

- Ensure that the `build_ext` task is called to generate SWIG .py files
  before the Python copy step happens and we miss packaging and
  installing the generated files.
- Wrap the `install` command for use with `pip`.  This is a bit of a
  hack because setuptools looks at the stack frame to determine if it
  was called from the setup function, and wrapping it would break that
  behavior.
- Wrap the `bdist_egg` command for use with `easy_install`.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 18.295% when pulling 41ca7d1 on ccpost:fix/pip-install into f793225 on LudovicRousseau:master.

@LudovicRousseau LudovicRousseau merged commit 9277d45 into LudovicRousseau:master Mar 27, 2016
@LudovicRousseau
Copy link
Owner

On Mac OS X 10.11 using Python 2.6 (default)

  • Installation using pip still fails.
  • Installation using easy_install works

ccpost added a commit to ccpost/pyscard that referenced this pull request Mar 27, 2016
…tall"

This reverts commit 9277d45, reversing
changes made to f793225.
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.

None yet

3 participants