changeset 5156:31ceaaddc3ab

Fix bug #62517: Dependency bug on PyPI for gnuhealth-dentistry
author Luis Falcon <falcon@gnuhealth.org>
date Mon, 06 Jun 2022 16:55:26 +0100
parents 7139fadf96fe
children 91632c9719bc
files tryton/health_dentistry/setup.py
diffstat 1 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/tryton/health_dentistry/setup.py
+++ b/tryton/health_dentistry/setup.py
@@ -17,7 +17,6 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import re
-import os
 import configparser
 from setuptools import setup
 
@@ -36,22 +35,20 @@
 requires = ['pytz', 'numpy']
 
 for dep in info.get('depends', []):
-    if (dep == 'health_dentistry'):
-        requires.append('gnuhealth_dentistry == %s' % (info.get('version')))
+    if (dep == 'health'):
+        requires.append('gnuhealth == %s' % (info.get('version')))
 
-    elif dep.startswith('health_dentistry_'):
-        health_dentistry_package = dep.split('_', 1)[1]
-        requires.append('gnuhealth_dentistry_%s == %s' %
-                        (health_dentistry_package, info.get('version')))
+    elif dep.startswith('health_'):
+        health_package = dep.split('_', 1)[1]
+        requires.append(
+            'gnuhealth_%s == %s' % (health_package, info.get('version')))
     else:
         if not re.match(r'(ir|res|webdav)(\W|$)', dep):
-            requires.append('trytond_%s >= %s.%s, < %s.%s' %
-                            (dep, major_version, minor_version, major_version,
-                             minor_version + 1))
+            requires.append(
+                'trytond_%s >= %s.%s, < %s.%s' %
+                (dep, major_version, minor_version, major_version,
+                    minor_version + 1))
 
-requires.append('trytond >= %s.%s, < %s.%s' %
-                (major_version, minor_version, major_version,
-                 minor_version + 1))
 
 setup(
     name='gnuhealth_dentistry',