-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #538 from TUDelft-CNS-ATM/build-update
Switched build backend to hatch
- Loading branch information
Showing
12 changed files
with
229 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from pathlib import Path | ||
from hatchling.builders.hooks.plugin.interface import BuildHookInterface | ||
|
||
from setuptools import Distribution, Extension | ||
from setuptools.command import build_ext | ||
|
||
def get_numpy_include(): | ||
import numpy | ||
return [numpy.get_include()] | ||
|
||
|
||
class CustomHook(BuildHookInterface): | ||
def initialize(self, version, build_data): | ||
print(version, build_data) | ||
extensions = [ | ||
Extension('bluesky.tools.geo._cgeo', ['bluesky/tools/geo/src_cpp/_cgeo.cpp']), | ||
Extension('bluesky.traffic.asas.cstatebased', ['bluesky/traffic/asas/src_cpp/cstatebased.cpp'], include_dirs=['bluesky/tools/geo/src_cpp'])] | ||
|
||
dist = Distribution(dict(name='extended', include_dirs=get_numpy_include(), | ||
ext_modules=extensions)) | ||
dist.package_dir = "extended" | ||
cmd = build_ext.build_ext(dist) | ||
cmd.verbose = True # type: ignore | ||
cmd.ensure_finalized() # type: ignore | ||
cmd.run() | ||
buildpath = Path(cmd.build_lib) | ||
|
||
# Provide locations of compiled modules | ||
force_include = {(buildpath / cmd.get_ext_filename('bluesky.tools.geo._cgeo')).as_posix(): cmd.get_ext_filename('bluesky.tools.geo._cgeo'), | ||
(buildpath / cmd.get_ext_filename('bluesky.traffic.asas.cstatebased')).as_posix(): cmd.get_ext_filename('bluesky.traffic.asas.cstatebased')} | ||
|
||
build_data['pure_python'] = False | ||
build_data['infer_tag'] = True | ||
build_data['force_include'].update(force_include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[project] | ||
name = "bluesky-guidata" | ||
version = "1.0.0" | ||
|
||
authors = [ | ||
{ name="Joost Ellerbroek", email="j.ellerbroek@tudelft.nl" }, | ||
{ name="Jacco Hoekstra", email="j.m.hoekstra@tudelft.nl" } | ||
] | ||
|
||
description = "Resources for the BlueSky Open ATM Simulator GUI" | ||
readme = "../../README.md" | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 4 - Beta", | ||
|
||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
|
||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
|
||
"Operating System :: OS Independent", | ||
] | ||
keywords = ['ATM', 'transport', 'simulation', 'aviation', 'aircraft'] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/TUDelft-CNS-ATM/bluesky" | ||
Issues = "https://github.com/TUDelft-CNS-ATM/bluesky/issues" | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build.targets.sdist.force-include] | ||
"../../bluesky/resources/graphics" = "bluesky/resources/graphics" | ||
"../../bluesky/resources/html" = "bluesky/resources/html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
[project] | ||
name = "bluesky-simulator" | ||
# dynamic = ["version"] | ||
version = "1.0.0" | ||
dependencies = [ | ||
"numpy >= 2.0.0", | ||
"scipy >= 1.13.0", | ||
"matplotlib >= 3.9.0", | ||
"pandas >= 2.2.0", | ||
"msgpack >= 1.0.0", | ||
"zmq" | ||
] | ||
|
||
authors = [ | ||
{ name="Joost Ellerbroek", email="j.ellerbroek@tudelft.nl" }, | ||
{ name="Jacco Hoekstra", email="j.m.hoekstra@tudelft.nl" } | ||
] | ||
|
||
description = "The Open Air Traffic Simulator." | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 4 - Beta", | ||
|
||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
|
||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
|
||
"Operating System :: OS Independent", | ||
] | ||
keywords = ['ATM', 'transport', 'simulation', 'aviation', 'aircraft'] | ||
|
||
[project.optional-dependencies] | ||
pygame = ["pygame"] | ||
qt6 = [ | ||
"pyopengl", | ||
"PyQt6", | ||
"PyQt6-WebEngine", | ||
"bluesky-guidata" | ||
] | ||
console = ["textual"] | ||
full =[ | ||
"pygame", | ||
"pyopengl", | ||
"PyQt6", | ||
"PyQt6-WebEngine", | ||
"textual", | ||
"bluesky-guidata", | ||
] | ||
# For headless (server-only) bluesky environment: pip install bluesky-simulator[headless] | ||
headless = [ | ||
# no extra dependencies | ||
] | ||
|
||
[project.scripts] | ||
bluesky = "bluesky.__main__:main" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/TUDelft-CNS-ATM/bluesky" | ||
Issues = "https://github.com/TUDelft-CNS-ATM/bluesky/issues" | ||
Documentation = "https://github.com/TUDelft-CNS-ATM/bluesky/wiki" | ||
Repository = "https://github.com/TUDelft-CNS-ATM/bluesky" | ||
# Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md" | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build] | ||
include = [ | ||
"bluesky/*", | ||
] | ||
exclude = [ | ||
'docs', | ||
'utils', | ||
'bluesky/test', | ||
'bluesky/resources/graphics', | ||
'bluesky/resources/html' | ||
] | ||
|
||
|
||
[tool.hatch.build.targets.wheel.hooks.custom] | ||
dependencies = ["setuptools>=69.1.1", "numpy"] | ||
|
||
# [tool.hatch.build.targets.wheel.hooks.cython] | ||
# dependencies = ["hatch-cython"] | ||
|
||
# [tool.hatch.build.targets.wheel.hooks.cython.options] | ||
# # include .h or .cpp directories | ||
# includes = [] | ||
# # include numpy headers | ||
# include_numpy = true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.