From 123700156f873a688fc8c5f5d0d021af9ce38e09 Mon Sep 17 00:00:00 2001 From: Christoph Boeddeker Date: Tue, 18 Jun 2024 15:36:50 +0200 Subject: [PATCH] fix setup.py for pypi - rst not supported and DESCRIPTION.rst is outdated - git dependency not supported, hence remove them --- setup.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e6e27cac..bc95ed62 100644 --- a/setup.py +++ b/setup.py @@ -24,9 +24,10 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file -with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: +with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() + # testing dependencies test = [ 'pytest', @@ -46,6 +47,17 @@ 'codecarbon', ] +if sys.argv != ['setup.py', 'sdist']: + # Remove git dependencies for sdist, because they are not supported on + # pypi. + # Can't have direct dependency: pb_bss@ git+http://github.com/fgnt/pb_bss ; extra == "test". + # https://packaging.python.org/specifications/core-metadata for more information. + test = [ + d + for d in test + if '@ git+http://' not in d + ] + setup( name='padertorch',