Skip to content

Commit

Permalink
Remove dependency to setuptools.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Feb 19, 2022
1 parent aa2f127 commit 6461c86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions python/jsbsim.pyx.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}'
Expand Down Expand Up @@ -59,15 +56,11 @@ geographic_error = <PyObject*>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
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6461c86

Please sign in to comment.