simstring
simstring copied to clipboard
Allow to install from pip
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.intosetup.py, removing thus the need to previously runconfigure. The package name is now static and the version is obtained by reading theconfigure.infile. - Modifying
setup.pyso that it callsprepare.shautomatically as a pre-hook.
Besides that, this patch also:
- Improves
prepare.sherror reporting, so that the user gets a meaningful error message if swig is missing from the system. - Removes
-liconv -lpythonfromextra_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)
+1 for this PR!
Any progress on this?