Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

enable install with pip from github #9

Merged
merged 4 commits into from
Dec 20, 2020
Merged

Conversation

philbarker
Copy link
Contributor

I wanted to install with
$ pip3 install -e git+https://github.com/tombaker/csv2shex.git#egg=csv2shex
and then import relevant classes, but there were problems.

Happy to amend PR if there are elements you don't like.

@tombaker tombaker merged commit 29f3d95 into tombaker:main Dec 20, 2020
@tombaker
Copy link
Owner

@philbarker
This looks okay, though I'm curious about the notion of an editable install that uses a URL. I guess that simply means that each time you import, it will pull from the repository? Also, I thought pyproject.toml was supposed to make setup.py unnecessary, though I see no harm in having both.

@philbarker
Copy link
Contributor Author

I think it only inports from the repo if you upgrade from pip.
Also, I think editable installs are the only case where setup.py is needed, at least that is the impression I got from https://stackoverflow.com/questions/62983756/what-is-pyproject-toml

Thanks for merging.

@tombaker
Copy link
Owner

tombaker commented Dec 21, 2020

@philbarker I have an editable install with just pyproject.toml - see the instructions in README.rst. The part I do not understand is what it means to pip install a remote repo in editable mode. The -s option in flit install -s makes it editable. For more discussion, see Brian Okken.

@philbarker
Copy link
Contributor Author

pip install from a remote repo in editable mode combines git clone with a pip -e editable install. It means that the csv2shex dependency for what I am writing can sit in the requirements.txt along with all the other requirements that I manage with pip. But it also gives me a copy of the source as a local git repo (in venv/src/csv2shex, so outside the project) that I can edit when things go wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants