From 369565ab74ae5c5b3518f011be72c12ee6c81948 Mon Sep 17 00:00:00 2001 From: Viktor Vorobev <vorobev@in.tum.de> Date: Tue, 18 Apr 2023 14:07:20 +0000 Subject: [PATCH] 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 --- README.md | 4 +++- hbp_nrp_virtual_coach/setup.py | 38 +++------------------------------- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 18adca1..c63be39 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ This repository is part of the Neurorobotics Platform software Copyright (C) Human Brain Project -https://neurorobotics.ai +https://neurorobotics.net 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). +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 the license that you find in the root folder. diff --git a/hbp_nrp_virtual_coach/setup.py b/hbp_nrp_virtual_coach/setup.py index c609006..4bb98c8 100644 --- a/hbp_nrp_virtual_coach/setup.py +++ b/hbp_nrp_virtual_coach/setup.py @@ -2,47 +2,15 @@ # pylint: disable=F0401,E0611,W0622,E0012,W0142,W0402 -from builtins import str -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -from optparse import Option # pylint:disable=deprecated-module -import pip +from setuptools import setup import pathlib import pynrp README = (pathlib.Path(__file__).parent / "README.txt").read_text() -options = Option('--workaround') -options.skip_requirements_regex = None reqs_file = './requirements.txt' - -pip_version_major = int(pip.__version__.split('.')[0]) -# 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 +install_reqs = list(val.strip() for val in open(reqs_file)) +reqs = install_reqs config = { 'description': 'Python interface to the Neurorobotics Platform (NRP)', -- GitLab