From 6461c864ca2570f8e0c63e6522bb911473d86e71 Mon Sep 17 00:00:00 2001 From: Bertrand Coconnier Date: Sat, 19 Feb 2022 15:06:12 +0100 Subject: [PATCH] Remove dependency to `setuptools`. --- python/jsbsim.pyx.in | 11 ++--------- python/setup.py.in | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/python/jsbsim.pyx.in b/python/jsbsim.pyx.in index d4c9d428a..88a87a400 100644 --- a/python/jsbsim.pyx.in +++ b/python/jsbsim.pyx.in @@ -1,7 +1,7 @@ # PyJSBSim a JSBSim python interface using cython. # # Copyright (c) 2013 James Goppert -# Copyright (c) 2014-2021 Bertrand Coconnier +# Copyright (c) 2014-2022 Bertrand Coconnier # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -28,9 +28,6 @@ import platform import site import sys -from setuptools.dist import Distribution -from setuptools.command.install import install - import numpy __version__='${PROJECT_VERSION}' @@ -59,15 +56,11 @@ geographic_error = GeographicError def get_default_root_dir(): """Return the root dir to default aircraft data.""" - # Runs a dummy install to capture the installation parameters. - cmd = install(Distribution()) - cmd.ensure_finalized() - # Test the following paths for JSBSim default root dir: # * `sys.prefix` and `sys.exec_prefix` are for virtual envs (pip & conda) # * `site.USER_BASE` is for pip install --user ... # * `cmd.install_data` is for system-wide installation. - for path in (cmd.install_data, site.USER_BASE, sys.prefix, sys.exec_prefix): + for path in (site.USER_BASE, sys.prefix, sys.exec_prefix): root_dir = os.path.join(path, 'share', '${PROJECT_NAME}') if os.path.isdir(root_dir): return root_dir diff --git a/python/setup.py.in b/python/setup.py.in index 73df157b4..671b04f7a 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -242,7 +242,7 @@ setup( "Topic :: Software Development :: Libraries :: Python Modules" ], scripts=['JSBSim'], - install_requires=['numpy', 'setuptools'], + install_requires=['numpy'], ext_modules=[Extension('jsbsim', language='c++', **ext_kwargs)], python_requires=">=3.7", data_files=data_files,