Skip to content
Snippets Groups Projects
Commit 369565ab authored by Viktor Vorobev's avatar Viktor Vorobev
Browse files

Merged in NRRPLT-8846-remove-pip-in-setup (pull request #45)

NRRPLT-8846 remove pip in setup

* [NRRPLT-8846] Get rid of obsolete pip workarounds

* [NRRPLT-8847] update Acknowledgments
parent 524a95e0
No related branches found
No related tags found
No related merge requests found
This repository is part of the Neurorobotics Platform software This repository is part of the Neurorobotics Platform software
Copyright (C) Human Brain Project Copyright (C) Human Brain Project
https://neurorobotics.ai https://neurorobotics.net
The Human Brain Project is a European Commission funded project The Human Brain Project is a European Commission funded project
in the frame of the [Horizon2020 FET Flagship plan](http://ec.europa.eu/programmes/horizon2020/en/h2020-section/fet-flagships). in the frame of the [Horizon2020 FET Flagship plan](http://ec.europa.eu/programmes/horizon2020/en/h2020-section/fet-flagships).
This work has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 720270 (Human Brain Project SGA1), and the Specific Grant Agreement No. 785907 (Human Brain Project SGA2), and under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).
You are free to clone this repository and amend its code with respect to You are free to clone this repository and amend its code with respect to
the license that you find in the root folder. the license that you find in the root folder.
......
...@@ -2,47 +2,15 @@ ...@@ -2,47 +2,15 @@
# pylint: disable=F0401,E0611,W0622,E0012,W0142,W0402 # pylint: disable=F0401,E0611,W0622,E0012,W0142,W0402
from builtins import str from setuptools import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from optparse import Option # pylint:disable=deprecated-module
import pip
import pathlib import pathlib
import pynrp import pynrp
README = (pathlib.Path(__file__).parent / "README.txt").read_text() README = (pathlib.Path(__file__).parent / "README.txt").read_text()
options = Option('--workaround')
options.skip_requirements_regex = None
reqs_file = './requirements.txt' reqs_file = './requirements.txt'
install_reqs = list(val.strip() for val in open(reqs_file))
pip_version_major = int(pip.__version__.split('.')[0]) reqs = install_reqs
# Hack for old pip versions
if pip_version_major == 1:
# Versions 1.x rely on pip.req.parse_requirements
# but don't require a "session" parameter
from pip.req import parse_requirements # pylint:disable=no-name-in-module, import-error
install_reqs = parse_requirements(reqs_file, options=options)
reqs = [str(ir.req) for ir in install_reqs]
elif 10 > pip_version_major > 1:
# Versions greater than 1.x but smaller than 10.x rely on pip.req.parse_requirements
# and requires a "session" parameter
from pip.req import parse_requirements # pylint:disable=no-name-in-module, import-error
from pip.download import PipSession # pylint:disable=no-name-in-module, import-error
options.isolated_mode = False
install_reqs = parse_requirements( # pylint:disable=unexpected-keyword-arg
reqs_file,
session=PipSession,
options=options
)
reqs = [str(ir.req) for ir in install_reqs]
elif pip_version_major >= 10:
# Versions greater or equal to 10.x don't rely on pip.req.parse_requirements
install_reqs = list(val.strip() for val in open(reqs_file))
reqs = install_reqs
config = { config = {
'description': 'Python interface to the Neurorobotics Platform (NRP)', 'description': 'Python interface to the Neurorobotics Platform (NRP)',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment