Closed ocefpaf closed 8 years ago
Thanks!! I'll test this.
Referencing the previous PR where we've discussed this issue, issue #18.
@emiliom Let me know if that works for you.
Took me lots of iterations, but I finally understood your instructions well enough to run several types of tests.
The good news: I have a working configuration that I'm happy with! It involved one small tweak to your pull request, preceded by some reading on my part to understand the roles of requirements.txt
vs setup.py
(I'm a newbie at this). FYI, these two documents helped clear things up for me:
Armed with that understanding, a better understanding of what's going on with install_requires
in setup.py, and a lot of previous tests, I tweaked requirements.txt
to specify geoalchemy as the plain package name, not as a url to the tar.gz. Doing this enables what I really wanted to accomplish: the simplest possible pip install
statement, ideally a single line, pointed at the github repo rather than having to download a dist first. That works now as:
pip install --process-dependency-links git+https://github.com/ODM2/ODM2PythonAPI.git
Note that all my testing has involved some "cheating", b/c I actually first create a conda env with all the dependencies that are available on conda channels (I created a conda requirements yaml file to make that even easier). Then I run the pip install statement. But in principle anyone should be able to run that pip install statement as is, w/o conda.
psycopg2 note: I'm leaving psycopg2 commented out in requirements.txt (and therefore not seen by setup.py either), per your comments. I can't say I've ever tried to install psycopg2 via pip install, and what I see on pypi suggests that it's pip installable only on windows. I'll let others deal with this later ;)
PS:
PS: Note that I am using the forked v0.7.3 tag for geoalchemy on both the requirements file and on setup.py. We can change that to accept any future version, but I thought that this is "safer" for now.
It's not a problem to stick with the v0.7.3 tag, b/c we have no intent of developing geoalchemy further (unless we discover important bugs ...).
Thank you @ocefpaf!!
I tweaked requirements.txt to specify geoalchemy as the plain package name
That is OK, and it is close to what we had in my first PR where I specified the version number, but keep in mind that people trying to create envs with pip install -r requirements.txt
won't get the right package!
but keep in mind that people tried to create envs with pip install -r requirements.txt won't get the right package!
Noted, thanks.
This PR will allow people to install the requirements with
pip install -r requirements.txt
as well as installing the source dist withpip
.I tried this and all seems to work:
Note that
--process-dependency-links
seems to be deprecated:Not sure how to solve that. I read a few threads that suggests this it won't be removed...
PS: Note that I am using the forked
v0.7.3
tag forgeoalchemy
on both the requirements file and onsetup.py
. We can changed that to accept any future version, but I thought that this is "safer" for now.