LINUX.ORG.RU
ФорумAdmin

Error in pyp2rpm setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers

 , ,


0

1

Пытаюсь установить pyp2rpm на CentOS7.

Если устанавливать pyp2rpm из rpm пакета, то в нем не будет шаблона epel7. Поэтому устанавливаю через pip.

Если просто запустить установку через pip pip install pyp2rpm

то получу ошибку

setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)

Обновляю setuptools до 12 версии pip install setuptools==12 Получаю ошибку

    Installed /tmp/pip-build-f3aMgP/pyp2rpm/.eggs/flexmock-0.10.4-py2.7.egg
    error in pyp2rpm setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-f3aMgP/pyp2rpm/

Обновление setuptools pip до последних версий

 pip install --upgrade setuptools pip
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/68/75/d1d7b7340b9eb6e0388bf95729e63c410b381eb71fe8875cdfd949d8f9ce/setuptools-45.2.0.zip (859kB)
    100% |████████████████████████████████| 860kB 1.1MB/s 
Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 784kB/s 
Installing collected packages: setuptools, pip
  Found existing installation: setuptools 12.0
    Uninstalling setuptools-12.0:
      Successfully uninstalled setuptools-12.0
  Running setup.py install for setuptools ... done
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-20.0.2 setuptools-45.2.0
``

pip install pyp2rpm

``
Collecting pyp2rpm
  Using cached pyp2rpm-3.3.3.tar.gz (2.6 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-OkyYAa/pyp2rpm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-OkyYAa/pyp2rpm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-OkyYAa/pyp2rpm/pip-egg-info
         cwd: /tmp/pip-install-OkyYAa/pyp2rpm/
    Complete output (70 lines):
    /usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
    ************************************************************
    You are running Setuptools on Python 2, which is no longer
    supported and
    >>> SETUPTOOLS WILL STOP WORKING <<<
    in a subsequent release (no sooner than 2020-04-20).
    Please ensure you are installing
    Setuptools using pip 9.x or later or pin to `setuptools<45`
    in your environment.
    If you have done those things and are still encountering
    this message, please comment in
    https://github.com/pypa/setuptools/issues/1458
    about the steps that led to this unsupported combination.
    ************************************************************
      sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
    WARNING: The wheel package is not available.
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    WARNING: The wheel package is not available.
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    WARNING: The wheel package is not available.
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-7_s7_K/flexmock/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-7_s7_K/flexmock/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 /tmp/pip-wheel-r4_mot
           cwd: /tmp/pip-wheel-7_s7_K/flexmock/
      Complete output (21 lines):
      /usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
      ************************************************************
      You are running Setuptools on Python 2, which is no longer
      supported and
      >>> SETUPTOOLS WILL STOP WORKING <<<
      in a subsequent release (no sooner than 2020-04-20).
      Please ensure you are installing
      Setuptools using pip 9.x or later or pin to `setuptools<45`
      in your environment.
      If you have done those things and are still encountering
      this message, please comment in
      https://github.com/pypa/setuptools/issues/1458
      about the steps that led to this unsupported combination.
      ************************************************************
        sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for flexmock
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-OkyYAa/pyp2rpm/setup.py", line 53, in <module>
        'Topic :: System :: Software Distribution',
      File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1078, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/lib/python2.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['/usr/bin/python2', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpTKN0L9', '--quiet', 'flexmock>=0.9.3']' returned non-zero exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


Последнее исправление: chemtech (всего исправлений: 4)

Ответ на: комментарий от peregrine
yum install -y epel-release
yum install -y python3-pip
python3 -m pip pip install pyp2rpm
python3 -m pip install pyp2rpm
python3 -m pip install wheel

Установилось

chemtech
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.