New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install rpyc == 4.0.0 fails when building wheel on windows 7 python 2.7 #276

Closed
klimburg opened this Issue Jun 11, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@klimburg

klimburg commented Jun 11, 2018

Describe the issue briefly here, including:

pip install rpyc == 4.0.0 fails when building wheel on windows 7 python 2.7

I setup a fresh virtualenv to reproduce the problem

MINGW64 /c
$ virtualenv test_rpyc
New python executable in C:\test_rpyc\Scripts\python.exe
Installing setuptools, pip, wheel...done.

MINGW64 /c
$ source ./test_rpyc/Scripts/activate
(test_rpyc)
MINGW64 /c
$ pip install rpyc==4.0.0
Building wheels for collected packages: rpyc
  Running setup.py bdist_wheel for rpyc: started
  Running setup.py bdist_wheel for rpyc: finished with status 'error'
  Complete output from command c:\test_rpyc\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\appdata\\local\\temp\\pip-install-uzupvq\\rpyc\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\appdata\local\temp\pip-wheel-pwbcuf --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\rpyc
  copying rpyc\version.py -> build\lib\rpyc
  copying rpyc\__init__.py -> build\lib\rpyc
  creating build\lib\rpyc\core
  copying rpyc\core\async.py -> build\lib\rpyc\core
  copying rpyc\core\async_.py -> build\lib\rpyc\core
  copying rpyc\core\brine.py -> build\lib\rpyc\core
  copying rpyc\core\channel.py -> build\lib\rpyc\core
  copying rpyc\core\consts.py -> build\lib\rpyc\core
  copying rpyc\core\netref.py -> build\lib\rpyc\core
  copying rpyc\core\protocol.py -> build\lib\rpyc\core
  copying rpyc\core\reactor.py -> build\lib\rpyc\core
  copying rpyc\core\service.py -> build\lib\rpyc\core
  copying rpyc\core\stream.py -> build\lib\rpyc\core
  copying rpyc\core\vinegar.py -> build\lib\rpyc\core
  copying rpyc\core\__init__.py -> build\lib\rpyc\core
  creating build\lib\rpyc\lib
  copying rpyc\lib\colls.py -> build\lib\rpyc\lib
  copying rpyc\lib\compat.py -> build\lib\rpyc\lib
  copying rpyc\lib\__init__.py -> build\lib\rpyc\lib
  creating build\lib\rpyc\utils
  copying rpyc\utils\authenticators.py -> build\lib\rpyc\utils
  copying rpyc\utils\classic.py -> build\lib\rpyc\utils
  copying rpyc\utils\factory.py -> build\lib\rpyc\utils
  copying rpyc\utils\helpers.py -> build\lib\rpyc\utils
  copying rpyc\utils\registry.py -> build\lib\rpyc\utils
  copying rpyc\utils\server.py -> build\lib\rpyc\utils
  copying rpyc\utils\teleportation.py -> build\lib\rpyc\utils
  copying rpyc\utils\zerodeploy.py -> build\lib\rpyc\utils
  copying rpyc\utils\__init__.py -> build\lib\rpyc\utils
  running build_scripts
  creating build\scripts-2.7
  copying and adjusting c:\appdata\local\temp\pip-install-uzupvq\rpyc\bin\rpyc_classic.py -> build\scripts-2.7
  copying and adjusting c:\appdata\local\temp\pip-install-uzupvq\rpyc\bin\rpyc_registry.py -> build\scripts-2.7
  installing to build\bdist.win-amd64\wheel
  running install
  running install_lib
  creating build\bdist.win-amd64
  creating build\bdist.win-amd64\wheel
  creating build\bdist.win-amd64\wheel\rpyc
  creating build\bdist.win-amd64\wheel\rpyc\core
  copying build\lib\rpyc\core\async.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\async_.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\brine.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\channel.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\consts.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\netref.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\protocol.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\reactor.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\service.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\stream.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\vinegar.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  copying build\lib\rpyc\core\__init__.py -> build\bdist.win-amd64\wheel\.\rpyc\core
  creating build\bdist.win-amd64\wheel\rpyc\lib
  copying build\lib\rpyc\lib\colls.py -> build\bdist.win-amd64\wheel\.\rpyc\lib
  copying build\lib\rpyc\lib\compat.py -> build\bdist.win-amd64\wheel\.\rpyc\lib
  copying build\lib\rpyc\lib\__init__.py -> build\bdist.win-amd64\wheel\.\rpyc\lib
  creating build\bdist.win-amd64\wheel\rpyc\utils
  copying build\lib\rpyc\utils\authenticators.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\classic.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\factory.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\helpers.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\registry.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\server.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\teleportation.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\zerodeploy.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\utils\__init__.py -> build\bdist.win-amd64\wheel\.\rpyc\utils
  copying build\lib\rpyc\version.py -> build\bdist.win-amd64\wheel\.\rpyc
  copying build\lib\rpyc\__init__.py -> build\bdist.win-amd64\wheel\.\rpyc
  running install_egg_info
  running egg_info
  writing requirements to rpyc.egg-info\requires.txt
  writing rpyc.egg-info\PKG-INFO
  writing top-level names to rpyc.egg-info\top_level.txt
  writing dependency_links to rpyc.egg-info\dependency_links.txt
  reading manifest file 'rpyc.egg-info\SOURCES.txt'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "c:\appdata\local\temp\pip-install-uzupvq\rpyc\setup.py", line 70, in <module>
      "Topic :: System :: Systems Administration",
    File "c:\test_rpyc\lib\site-packages\setuptools\__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "c:\python27\Lib\distutils\core.py", line 151, in setup
      dist.run_commands()
    File "c:\python27\Lib\distutils\dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "c:\test_rpyc\lib\site-packages\wheel\bdist_wheel.py", line 238, in run
      self.run_command('install')
    File "c:\python27\Lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\install.py", line 61, in run
      return orig.install.run(self)
    File "c:\python27\Lib\distutils\command\install.py", line 575, in run
      self.run_command(cmd_name)
    File "c:\python27\Lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
      self.run_command('egg_info')
    File "c:\python27\Lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\egg_info.py", line 278, in run
      self.find_sources()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\egg_info.py", line 293, in find_sources
      mm.run()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\egg_info.py", line 524, in run
      self.add_defaults()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\egg_info.py", line 567, in add_defaults
      self.read_manifest()
    File "c:\test_rpyc\lib\site-packages\setuptools\command\sdist.py", line 199, in read_manifest
      self.filelist.append(line)
    File "c:\test_rpyc\lib\site-packages\setuptools\command\egg_info.py", line 466, in append
      path = convert_path(item)
    File "c:\python27\Lib\distutils\util.py", line 124, in convert_path
      raise ValueError, "path '%s' cannot be absolute" % pathname
  ValueError: path '/home/thomas/dev/project/rpyc/bin/rpyc_classic.py' cannot be absolute

Environment
  • rpyc version 4.0.0
  • python version 2.7.13
  • operating system Windows 7
@dniquetteCarbon

This comment has been minimized.

dniquetteCarbon commented Jun 11, 2018

👍 I'm also seeing this issue with python 3.6 on RS4 x64, win8.1 x64 and CentOs.
This looks to be the issue

ValueError: path '/home/thomas/dev/project/rpyc/bin/rpyc_classic.py' cannot be absolute
@coldfix

This comment has been minimized.

Collaborator

coldfix commented Jun 12, 2018

Thanks for the feedback. I assume this happens due to passing absolute paths to the scripts parameter in setup.py. Curiously, this hasn't been any different in ages, so I'm not sure why this happens only now (possibly because it wasn't an issue with wheels). I'll do a post-release shortly, please report back if you still experience problems.

@coldfix coldfix closed this in 0a7cc3c Jun 12, 2018

coldfix added a commit that referenced this issue Jun 12, 2018

Release rpyc 4.0.1
- fix ValueError during install due to absolute PATH in SOURCES.txt (`#276`_)

.. _#276: #276
@coldfix

This comment has been minimized.

Collaborator

coldfix commented Jun 12, 2018

Follow up: curiously the installation error was not reproducible on archlinux (even if the absolute path does not exist).

The problem was probably caused by rpyc.egg_info/SOURCES.txt containing the scripts as absolute paths. The solution was to remove and regenerate this file (even without any code changes). The patch (0a7cc3c) was not needed to get the correct behaviour after all (but it might prevent similar issues in the future). Furthermore, I just learned that python setup.py sdist apparently does not force regenerating SOURCES.txt (I redid the source distribution after applying the patch with no effect).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment