djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 376 forks source link

Installing from PyPI with pip still broken #100

Closed calpaterson closed 9 years ago

calpaterson commented 9 years ago

Hey,

I can see that you merged PR #97 recently to fix this issue, but it's still not possible to install via pip for me. Here's a transcript:

(tempenv-5f92108943223) cal@hp-elitedesk ~/s/b/i/ops> pip install apns
Downloading/unpacking apns
  Downloading apns-2.0.tar.gz
  Running setup.py (path:/home/cal/.virtualenvs/tempenv-5f92108943223/build/apns/setup.py) egg_info for package apns

Installing collected packages: apns
  Running setup.py install for apns
    error: file '/home/cal/.virtualenvs/tempenv-5f92108943223/build/apns/apns-send' does not exist
    Complete output from command /home/cal/.virtualenvs/tempenv-5f92108943223/bin/python -c "import setuptools, tokenize;__file__='/home/cal/.virtualenvs/tempenv-5f92108943223/build/apns/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gleqyn-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/cal/.virtualenvs/tempenv-5f92108943223/include/site/python2.7:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

copying apns.py -> build/lib.linux-x86_64-2.7

running build_scripts

creating build/scripts-2.7

error: file '/home/cal/.virtualenvs/tempenv-5f92108943223/build/apns/apns-send' does not exist

----------------------------------------
Cleaning up...
Command /home/cal/.virtualenvs/tempenv-5f92108943223/bin/python -c "import setuptools, tokenize;__file__='/home/cal/.virtualenvs/tempenv-5f92108943223/build/apns/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gleqyn-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/cal/.virtualenvs/tempenv-5f92108943223/include/site/python2.7 failed with error code 1 in /home/cal/.virtualenvs/tempenv-5f92108943223/build/apns
Storing debug log for failure in /home/cal/.pip/pip.log
luccascorrea commented 9 years ago

+1

xissburg commented 9 years ago

+1

denisov commented 9 years ago

+1

jonhairston commented 9 years ago

+1

Zearin commented 9 years ago

+1 !!!

OH MY GOD. I thought I was crazy regarding this issue. Nice to know I’m not alone.

If it helps, here was my output:

$ pip2 install apns
Collecting apns
  Downloading apns-2.0.tar.gz
Installing collected packages: apns
  Running setup.py install for apns
    error: file '/private/var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-build-SOCaMq/apns/apns-send' does not exist
    Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-build-SOCaMq/apns/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-m77g2I-record/install-record.txt --single-version-externally-managed --compile:
    running install

    running build

    running build_py

    creating build

    creating build/lib

    copying apns.py -> build/lib

    running build_scripts

    creating build/scripts-2.7

    error: file '/private/var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-build-SOCaMq/apns/apns-send' does not exist

    ----------------------------------------
    Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-build-SOCaMq/apns/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-m77g2I-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/folders/5r/xq6y7k_95h568t_0qwmycdb40000gp/T/pip-build-SOCaMq/apns

This has been happening for months. During all that time, I’ve been trying everything I can think of to fix it. Please help!

blixt commented 9 years ago

Same here…

blixt commented 9 years ago

I looked into it and it seems that the latest version in this repo hasn't been uploaded to the Python Package Index. Version 2.0 on there was updated November 3: https://pypi.python.org/pypi/apns/2.0

The fix would be to update version in this repo to 2.0.1 and upload it.

blixt commented 9 years ago

Here's the required change: https://github.com/djacobs/PyAPNs/pull/104

Only @djacobs and @simonwhitaker are able to push it to the Python Package Index, though.

djacobs commented 9 years ago

@blixt I'll look into this.

blixt commented 9 years ago

@djacobs Cool, thank you! :)

FloresRobles commented 9 years ago

+1

blixt commented 9 years ago

People who are still having this issue can use this temporary solution until it's fixed in this repo. Putting this line in requirements.txt instead of the normal line that includes PyAPNs will work:

git+git://github.com/blixt/PyAPNs.git@88767427f4f3215f2aafe579c84c55457706e011#egg=apns

It points to the specific commit that is contained in my pull request above.

djacobs commented 9 years ago

We're up. https://pypi.python.org/pypi/apns/2.0.1