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

Allow to install from pip #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

thotypous
Copy link

@thotypous thotypous commented Apr 18, 2020

Currently, it is impossible to install simstring Python bindings directly from pip (e.g. via a pip-requirements.txt file in a project). It is currently necessary to manually clone the repository, run configure, enter the Python bindings directory, run prepare.sh, to finally be able to run setup.py or pip.

This patches fixes this issue by:

  • Renaming setup.py.in to setup.py, removing thus the need to previously run configure. The package name is now static and the version is obtained by reading the configure.in file.
  • Modifying setup.py so that it calls prepare.sh automatically as a pre-hook.

Besides that, this patch also:

  • Improves prepare.sh error reporting, so that the user gets a meaningful error message if swig is missing from the system.
  • Removes -liconv -lpython from extra_link_args. It is not necessary anymore to explicitly include these libraries (you can just assume they are loaded) - tested in Ubuntu LTS and Arch Linux. By removing them, simstring can be built for PyPy.

After this patch is merged, one will be able to install using pip by including the following line in their pip-requirements.txt file:

-e git+https://github.com/chokkan/simstring.git#egg=simstring&subdirectory=swig/python 

(you can test with my fork if you want to test before merging)

@fginter
Copy link

fginter commented Dec 1, 2020

+1 for this PR!

@PyDataBlog
Copy link

Any progress on this?

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.

3 participants