From fb75988f21b4142267f85c273d0141bc79858848 Mon Sep 17 00:00:00 2001 From: Joost Ellerbroek Date: Fri, 16 Sep 2022 14:04:01 +0200 Subject: [PATCH] packaging update --- requirements.txt | 3 +- setup.py | 108 +++++++++++++-------------- setup_guidata.py | 1 - setup_perfdata.py | 49 ------------ setup_navdata.py => setup_simdata.py | 6 +- 5 files changed, 58 insertions(+), 109 deletions(-) delete mode 100644 setup_perfdata.py rename setup_navdata.py => setup_simdata.py (89%) diff --git a/requirements.txt b/requirements.txt index d00ec14432..651a82c903 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ matplotlib msgpack >= 1.0.0 zmq pandas -bluesky-perfdata -bluesky-navdata \ No newline at end of file +bluesky-simdata \ No newline at end of file diff --git a/setup.py b/setup.py index 07126a5f7c..8a9609d0e0 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # Always prefer setuptools over distutils import os from pathlib import Path -from setuptools import setup, find_packages, find_namespace_packages, Extension +from setuptools import setup, find_packages, Extension import configparser import numpy as np @@ -27,65 +27,65 @@ 'test': ['coverage', 'flake8', 'radon', 'nose'], }) -try: +if not Path('bluesky/resources/scenario').exists(): os.symlink('../../scenario', 'bluesky/resources/scenario') +if not Path('bluesky/resources/plugins').exists(): os.symlink('../../plugins', 'bluesky/resources/plugins') - print(list(Path('bluesky/resources').glob('*'))) - setup( - name='bluesky-simulator', # 'bluesky' package name already taken in PyPI - use_calver=True, - setup_requires=['calver'], - install_requires=install_requires, - extras_require=extras_requirements, - author='The BlueSky community', - license='GNU General Public License v3 (GPLv3)', - maintainer='Jacco Hoekstra and Joost Ellerbroek', - description='The Open Air Traffic Simulator', - long_description=long_description, - long_description_content_type="text/markdown", - url='https://github.com/TUDelft-CNS-ATM/bluesky', - classifiers=[ - 'Development Status :: 4 - Beta', - # Indicate who your project is intended for - 'Intended Audience :: Science/Research', - 'Topic :: Scientific/Engineering', +setup( + name='bluesky-simulator', # 'bluesky' package name already taken in PyPI + use_calver=True, + setup_requires=['calver'], + install_requires=install_requires, + extras_require=extras_requirements, + author='The BlueSky community', + license='GNU General Public License v3 (GPLv3)', + maintainer='Jacco Hoekstra and Joost Ellerbroek', + description='The Open Air Traffic Simulator', + long_description=long_description, + long_description_content_type="text/markdown", + url='https://github.com/TUDelft-CNS-ATM/bluesky', + classifiers=[ + 'Development Status :: 4 - Beta', - # Pick your license as you wish - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + # Indicate who your project is intended for + 'Intended Audience :: Science/Research', + 'Topic :: Scientific/Engineering', - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10' + # Pick your license as you wish + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + + # Specify the Python versions you support here. In particular, ensure + # that you indicate whether you support Python 2, Python 3 or both. + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10' + ], + + # This field adds keywords for your project which will appear on the + keywords='atm transport simulation aviation aircraft', + packages=find_packages(exclude=['contrib', 'docs', 'tests', 'bluesky/resources/graphics', 'bluesky/resources/html', 'bluesky/resources/navdata', 'bluesky/resources/performance']),# Required + include_package_data=True, + exclude_package_data={'bluesky': ['resources/graphics/*', 'resources/html/*', 'resources/navdata/*', 'resources/performance/*']}, + package_data={ + 'bluesky': ['resources/*'] + }, + entry_points={ + 'console_scripts': [ + 'bluesky=bluesky.__main__:main', ], + }, - # This field adds keywords for your project which will appear on the - keywords='atm transport simulation aviation aircraft', - packages=find_packages(exclude=['contrib', 'docs', 'tests', 'bluesky/resources/graphics', 'bluesky/resources/html', 'bluesky/resources/navdata', 'bluesky/resources/performance']),# Required - include_package_data=True, - exclude_package_data={'bluesky': ['resources/graphics/*', 'resources/html/*', 'resources/navdata/*', 'resources/performance/*']}, - package_data={ - 'bluesky': ['resources/*'] - }, - entry_points={ - 'console_scripts': [ - 'bluesky=bluesky.__main__:main', - ], - # 'bluesky.resources': [ - # 'base = bluesky.resources' - # ] - }, + project_urls={ + 'Source': 'https://github.com/TUDelft-CNS-ATM/bluesky', + }, + include_dirs=[np.get_include()], + ext_modules=[Extension('bluesky.tools.cgeo', ['bluesky/tools/src_cpp/cgeo.cpp']), + Extension('bluesky.traffic.asas.cstatebased', ['bluesky/traffic/asas/src_cpp/cstatebased.cpp'], include_dirs=['bluesky/tools/src_cpp'])] +) - project_urls={ - 'Source': 'https://github.com/TUDelft-CNS-ATM/bluesky', - }, - include_dirs=[np.get_include()], - ext_modules=[Extension('bluesky.tools.cgeo', ['bluesky/tools/src_cpp/cgeo.cpp']), - Extension('bluesky.traffic.asas.cstatebased', ['bluesky/traffic/asas/src_cpp/cstatebased.cpp'], include_dirs=['bluesky/tools/src_cpp'])] - ) -finally: +if Path('bluesky/resources/scenario').is_symlink(): os.unlink('bluesky/resources/scenario') - os.unlink('bluesky/resources/plugins') \ No newline at end of file +if Path('bluesky/resources/plugins').is_symlink(): + os.unlink('bluesky/resources/plugins') diff --git a/setup_guidata.py b/setup_guidata.py index 123e350379..cb241c10f4 100644 --- a/setup_guidata.py +++ b/setup_guidata.py @@ -1,6 +1,5 @@ from setuptools import setup from os import path -import glob # Get the long description from the README file diff --git a/setup_perfdata.py b/setup_perfdata.py deleted file mode 100644 index 0bdaec9d30..0000000000 --- a/setup_perfdata.py +++ /dev/null @@ -1,49 +0,0 @@ -from setuptools import setup -from os import path -import glob - - -# Get the long description from the README file -here = path.abspath(path.dirname(__file__)) -with open(path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = f.read() - - -setup( - name='bluesky-perfdata', - use_calver=True, - setup_requires=['calver'], - author='The BlueSky community', - license='GNU General Public License v3 (GPLv3)', - maintainer='Jacco Hoekstra and Joost Ellerbroek', - description='The Open Air Traffic Simulator - GUI resources', - long_description=long_description, - long_description_content_type="text/markdown", - url='https://github.com/TUDelft-CNS-ATM/bluesky', - classifiers=[ - 'Development Status :: 4 - Beta', - - # Indicate who your project is intended for - 'Intended Audience :: Science/Research', - 'Topic :: Scientific/Engineering', - - # Pick your license as you wish - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10' - ], - - # This field adds keywords for your project which will appear on the - keywords='atm transport simulation aviation aircraft', - packages=['bluesky.resources.performance'], # Required - include_package_data=True, - project_urls={ - 'Source': 'https://github.com/TUDelft-CNS-ATM/bluesky', - }, - zip_safe=False -) \ No newline at end of file diff --git a/setup_navdata.py b/setup_simdata.py similarity index 89% rename from setup_navdata.py rename to setup_simdata.py index 1118e369d1..74cb15d158 100644 --- a/setup_navdata.py +++ b/setup_simdata.py @@ -10,13 +10,13 @@ setup( - name='bluesky-navdata', + name='bluesky-simdata', use_calver=True, setup_requires=['calver'], author='The BlueSky community', license='GNU General Public License v3 (GPLv3)', maintainer='Jacco Hoekstra and Joost Ellerbroek', - description='The Open Air Traffic Simulator - GUI resources', + description='The Open Air Traffic Simulator - simulation resources', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/TUDelft-CNS-ATM/bluesky', @@ -40,7 +40,7 @@ # This field adds keywords for your project which will appear on the keywords='atm transport simulation aviation aircraft', - packages=['bluesky.resources.navdata'], # Required + packages=['bluesky.resources.performance', 'bluesky.resources.navdata'], # Required include_package_data=True, project_urls={ 'Source': 'https://github.com/TUDelft-CNS-ATM/bluesky',