flyte / apcaccess

MIT License
31 stars 7 forks source link

apcaccess can't be installed using pip3 #4

Closed pezinek closed 6 years ago

pezinek commented 7 years ago

When installing apcaccess 0.0.10 as a dependency for homeassistant 0.47.1 to Alpine Linux 3.6 on armv7l architecture (orange pi), setup.py died because there was no suitable version for pytest-runner available. However when I installed pytest-runner manually via pip it passed just fine, and as well subsequent installation of apcaccess succeeded. Looks like a bug in your setup.py to me.

# python3 --version
Python 3.6.1`

# uname -a
Linux orangepizero 4.10.11-sun8i #2 SMP Tue Apr 25 02:59:15 CEST 2017 armv7l Linux

# pip3 install apcaccess==0.0.10 --verbose
Collecting apcaccess==0.0.10
  1 location(s) to search for versions of apcaccess:
  * https://pypi.python.org/simple/apcaccess/
  Getting page https://pypi.python.org/simple/apcaccess/
  Looking up "https://pypi.python.org/simple/apcaccess/" in the cache
  Current age based on date: 103
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 103
  Analyzing links from page https://pypi.python.org/simple/apcaccess/
    Found link https://pypi.python.org/packages/05/28/b6af6f86877992a382c2577fb30552eeae614011652888abcaf53128e82e/apcaccess-0.0.8.tar.gz#md5=853e27fc96c933eb109d44d569bf58b7 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.8
    Found link https://pypi.python.org/packages/26/1c/3b24e05d128c816af66c2b0603eaed495487ee523592377e46636c14c0c0/apcaccess-0.0.9.tar.gz#md5=9125d61057227ccad91479e24a545d21 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.9
    Found link https://pypi.python.org/packages/49/7f/97d305b262fc7e328dbe2dda37cf2300b38fd42f7833a5c27ac9430b476b/apcaccess-0.0.3.tar.gz#md5=3a73205fe6b81af71d01b349301936c8 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.3
    Found link https://pypi.python.org/packages/67/ca/1ac5471f100329b8cbb3f3671434c2f3b36de879f40c7806a1acf51980ec/apcaccess-0.0.7.tar.gz#md5=3a31129bc97a5edbdedc64e262f7153e (from https://pypi.python.org/simple/apcaccess/), version: 0.0.7
    Found link https://pypi.python.org/packages/b2/41/778e50f8fe668c6d5db2dd50f44dabff91aec728d096e218086fce321aff/apcaccess-0.0.4.tar.gz#md5=4abeced83ce387fdbbc48dac15fe961b (from https://pypi.python.org/simple/apcaccess/), version: 0.0.4
    Found link https://pypi.python.org/packages/c3/ad/7fee10f4ac89141adb0d85b40d055bf3a295dec5e593130c3d073199257d/apcaccess-0.0.6.tar.gz#md5=6368de2798b68bc42a7cdbeaed7ef4bc (from https://pypi.python.org/simple/apcaccess/), version: 0.0.6
    Found link https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz#md5=ee1caf9874b2522f3415d3d59f8393d4 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.10
  Using version 0.0.10 (newest of versions: 0.0.10)
  Looking up "https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz" in the cache
  Current age based on date: 2315
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 2315
  Using cached apcaccess-0.0.10.tar.gz
  Downloading from URL https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz#md5=ee1caf9874b2522f3415d3d59f8393d4 (from https://pypi.python.org/simple/apcaccess/)
  Running setup.py (path:/tmp/pip-build-n3grmit8/apcaccess/setup.py) egg_info for package apcaccess
    Running command python setup.py egg_info
    Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    Couldn't find index page for 'pytest-runner' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    No local packages or working download links found for pytest-runner
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-n3grmit8/apcaccess/setup.py", line 75, in <module>
        url="https://github.com/flyte/apcaccess"
      File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
        return installer(requirement)
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n3grmit8/apcaccess/
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n3grmit8/apcaccess/

The above failed however following manual instalation succeeded.

# pip3 install pytest-runner
Collecting pytest-runner
  Downloading pytest_runner-2.11.1-py2.py3-none-any.whl
Installing collected packages: pytest-runner
Successfully installed pytest-runner-2.11.1

# pip3 install apcaccess==0.0.10 --verbose
Collecting apcaccess==0.0.10
  1 location(s) to search for versions of apcaccess:
  * https://pypi.python.org/simple/apcaccess/
  Getting page https://pypi.python.org/simple/apcaccess/
  Looking up "https://pypi.python.org/simple/apcaccess/" in the cache
  Current age based on date: 953
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The cached response is "stale" with no etag, purging
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/apcaccess/ HTTP/1.1" 200 653
  Updating cache with response from "https://pypi.python.org/simple/apcaccess/"
  Caching b/c date exists and max-age > 0
  Analyzing links from page https://pypi.python.org/simple/apcaccess/
    Found link https://pypi.python.org/packages/05/28/b6af6f86877992a382c2577fb30552eeae614011652888abcaf53128e82e/apcaccess-0.0.8.tar.gz#md5=853e27fc96c933eb109d44d569bf58b7 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.8
    Found link https://pypi.python.org/packages/26/1c/3b24e05d128c816af66c2b0603eaed495487ee523592377e46636c14c0c0/apcaccess-0.0.9.tar.gz#md5=9125d61057227ccad91479e24a545d21 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.9
    Found link https://pypi.python.org/packages/49/7f/97d305b262fc7e328dbe2dda37cf2300b38fd42f7833a5c27ac9430b476b/apcaccess-0.0.3.tar.gz#md5=3a73205fe6b81af71d01b349301936c8 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.3
    Found link https://pypi.python.org/packages/67/ca/1ac5471f100329b8cbb3f3671434c2f3b36de879f40c7806a1acf51980ec/apcaccess-0.0.7.tar.gz#md5=3a31129bc97a5edbdedc64e262f7153e (from https://pypi.python.org/simple/apcaccess/), version: 0.0.7
    Found link https://pypi.python.org/packages/b2/41/778e50f8fe668c6d5db2dd50f44dabff91aec728d096e218086fce321aff/apcaccess-0.0.4.tar.gz#md5=4abeced83ce387fdbbc48dac15fe961b (from https://pypi.python.org/simple/apcaccess/), version: 0.0.4
    Found link https://pypi.python.org/packages/c3/ad/7fee10f4ac89141adb0d85b40d055bf3a295dec5e593130c3d073199257d/apcaccess-0.0.6.tar.gz#md5=6368de2798b68bc42a7cdbeaed7ef4bc (from https://pypi.python.org/simple/apcaccess/), version: 0.0.6
    Found link https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz#md5=ee1caf9874b2522f3415d3d59f8393d4 (from https://pypi.python.org/simple/apcaccess/), version: 0.0.10
  Using version 0.0.10 (newest of versions: 0.0.10)
  Looking up "https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz" in the cache
  Current age based on date: 3164
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 3164
  Using cached apcaccess-0.0.10.tar.gz
  Downloading from URL https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz#md5=ee1caf9874b2522f3415d3d59f8393d4 (from https://pypi.python.org/simple/apcaccess/)
  Running setup.py (path:/tmp/pip-build-6r6r6i6h/apcaccess/setup.py) egg_info for package apcaccess
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/apcaccess.egg-info
    writing pip-egg-info/apcaccess.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/apcaccess.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/apcaccess.egg-info/entry_points.txt
    writing top-level names to pip-egg-info/apcaccess.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/apcaccess.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/apcaccess.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/apcaccess.egg-info/SOURCES.txt'
  Source in /tmp/pip-build-6r6r6i6h/apcaccess has version 0.0.10, which satisfies requirement apcaccess==0.0.10 from https://pypi.python.org/packages/f5/6c/aaecb8cbe080b09da5d0c5d42d14e9d9c57ab436928a72937eb0f15fdf71/apcaccess-0.0.10.tar.gz#md5=ee1caf9874b2522f3415d3d59f8393d4
Installing collected packages: apcaccess
  Running setup.py install for apcaccess ...     Running command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6r6r6i6h/apcaccess/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-forajtzd-record/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/apcaccess
    copying apcaccess/status.py -> build/lib/apcaccess
    copying apcaccess/__init__.py -> build/lib/apcaccess
    copying apcaccess/__main__.py -> build/lib/apcaccess
    running egg_info
    writing apcaccess.egg-info/PKG-INFO
    writing dependency_links to apcaccess.egg-info/dependency_links.txt
    writing entry points to apcaccess.egg-info/entry_points.txt
    writing top-level names to apcaccess.egg-info/top_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'apcaccess.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'apcaccess.egg-info/SOURCES.txt'
    running install_lib
    creating /usr/lib/python3.6/site-packages/apcaccess
    copying build/lib/apcaccess/status.py -> /usr/lib/python3.6/site-packages/apcaccess
    copying build/lib/apcaccess/__init__.py -> /usr/lib/python3.6/site-packages/apcaccess
    copying build/lib/apcaccess/__main__.py -> /usr/lib/python3.6/site-packages/apcaccess
    byte-compiling /usr/lib/python3.6/site-packages/apcaccess/status.py to status.cpython-36.pyc
    byte-compiling /usr/lib/python3.6/site-packages/apcaccess/__init__.py to __init__.cpython-36.pyc
    byte-compiling /usr/lib/python3.6/site-packages/apcaccess/__main__.py to __main__.cpython-36.pyc
    running install_egg_info
    Copying apcaccess.egg-info to /usr/lib/python3.6/site-packages/apcaccess-0.0.10-py3.6.egg-info
    running install_scripts
    Installing apcaccess script to /usr/bin
    writing list of installed files to '/tmp/pip-forajtzd-record/install-record.txt'
done
  Removing source in /tmp/pip-build-6r6r6i6h/apcaccess
Successfully installed apcaccess-0.0.10
Cleaning up...
flyte commented 7 years ago

Hi, thanks for the report. I'm not sure this is an issue with this package though, as it looks like you were getting certificate errors from PyPI:

Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    No local packages or working download links found for pytest-runner

Could you try your test again?

flyte commented 6 years ago

Closing this issue as I believe it was an external issue. Feel free to reopen it if you believe my evaluation is wrong.