Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Make pip installable #256

Closed
pykler opened this issue Jun 9, 2016 · 11 comments
Closed

Make pip installable #256

pykler opened this issue Jun 9, 2016 · 11 comments

Comments

@pykler
Copy link

pykler commented Jun 9, 2016

Currently this repo is not directly installable, it is neither uploaded to pypi nor is in installable with the following expression

pip install git+https://github.com/Esri/ArcREST.git

Similarly the source archives are not. This is because setup.py is not at the root of the repo.

Another issue, this repo is named ArcRest which is a name that is already taken in pypi, so sticking with this name moving forward will only make things more problematic.

Steps to solve these issues

  1. Rename the package to ArcRestPy or similar (just the package name in setup.py no need to rename the repo)
  2. register that name in pypi asap to reserve it.
  3. Upload the dist package to pypi https://pythonhosted.org/an_example_pypi_project/setuptools.html#uploading-your-project
  4. Work on setting up this repo with a standard python repo layout.
@pykler
Copy link
Author

pykler commented Jun 9, 2016

I now see that this is actually uploaded to pypi as https://pypi.python.org/pypi/ArcREST_Package since the name in setup.py is different than on pypi, this is a little problematic but a good first step.

@pykler
Copy link
Author

pykler commented Jun 9, 2016

And it doesnt actually install from pypi either 😱

% pip install ArcREST_Package
Collecting ArcREST_Package
  Downloading ArcREST_Package-3.5.3.tar.gz (1.1MB)
    100% |████████████████████████████████| 1.1MB 966kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/hatem/.virtualenvs/tmp3/lib/python3.4/tokenize.py", line 437, in open
        buffer = builtins.open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/b0/_3p5d82134n8xtp1l9zlh_200000gn/T/pip-build-lhkmejr2/ArcREST-Package/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/b0/_3p5d82134n8xtp1l9zlh_200000gn/T/pip-build-lhkmejr2/ArcREST-Package/

@achapkowski
Copy link
Collaborator

@pykler We will take a look.

@achapkowski
Copy link
Collaborator

achapkowski commented Jun 10, 2016

@pykler You can now do:
pip install arcrest_package

@pykler
Copy link
Author

pykler commented Jun 10, 2016

Yes doing that doesn't work. So the package uploaded to pypi is broken and
can never be installed because setup tools can't find the setup.py file.
On Jun 10, 2016 8:32 AM, "Andrew" notifications@github.com wrote:

@pykler https://github.com/pykler You can not do:
pip install arcrest_package


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#256 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AACwWtnJcAptM2HsOpneKX3_awsl1AE8ks5qKUtVgaJpZM4Ix-fV
.

@achapkowski
Copy link
Collaborator

@pykler it works for me.

@achapkowski
Copy link
Collaborator

@pykler please post your error. Make sure you aren't using a cached version. I removed the old versions this morning.

@pykler
Copy link
Author

pykler commented Jun 10, 2016

works now, thanks. Can you please add the pip install command to the readme, it will make it easier for people to find since the pypi name is different from the package name.

@pykler pykler closed this as completed Jun 10, 2016
@pykler
Copy link
Author

pykler commented Jun 10, 2016

Also the latest version is now 3.5.6 as of pypi, so another thing to perhaps add to the README.

@lsloan
Copy link
Contributor

lsloan commented Aug 17, 2016

Ideally, it should be installable with either command:

pip install git+https://github.com/Esri/ArcREST.git

or

pip install arcrest_package

Also, arcrest_package is a rather awkward name. Why not name it esri_arcrest?

@lsloan
Copy link
Contributor

lsloan commented Aug 19, 2016

It bothered me that installation by git repository URL downloads the code and attempts to install, but fails because of the incorrect structure of this project. I thought that pip must have (or should have) some way to specify that it should look in a different directory.

It does. It just needs a specially formatted addition to the URL.

The command using the URL with a specially formatted fragment suffix for installing the version 3.5.3 tag (Hey! Where's the 3.5.6 tag‽) is:

pip install 'git+https://github.com/Esri/ArcREST.git@3.5.3#egg=arcrest&subdirectory=src'

Version 3.5.6 may be installed (even though it's not been tagged), by installing from the default branch:

pip install 'git+https://github.com/Esri/ArcREST.git#egg=arcrest&subdirectory=src'

Although this information will help others install ArcREST with its current directory structure, I hope that doesn't keep the development team from correcting the layout.

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

No branches or pull requests

3 participants