forked from skogler/mapbox_earcut_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,35 @@ requires = [ | |
"setuptools>=42", | ||
"wheel", | ||
"pybind11~=2.6", | ||
"numpy>=1.19.5" | ||
"numpy>=1.26.0" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mapbox_earcut" | ||
version = "1.0.2" | ||
requires-python = ">=3.7" | ||
authors = [{name = "Samuel Kogler", email = "[email protected]"}] | ||
license = {file = "LICENSE.md"} | ||
description = "Python bindings for the mapbox earcut C++ polygon triangulation library." | ||
dependencies = ["numpy>=1.26.0"] | ||
|
||
[project.urls] | ||
Source = "https://github.com/skogler/mapbox_earcut_python" | ||
CSource = "https://github.com/mapbox/earcut.hpp" | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
include-package-data = true | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
|
||
|
||
[tool.cibuildwheel] | ||
# install the `test` extra | ||
test-extras = ["test"] | ||
|
@@ -17,4 +42,3 @@ test-skip = "*_arm64 *_universal2:arm64" | |
|
||
[tool.cibuildwheel.macos] | ||
archs = ["x86_64", "arm64"] | ||
|
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 |
---|---|---|
@@ -1,42 +1,19 @@ | ||
import os | ||
|
||
from setuptools import setup | ||
from pybind11.setup_helpers import Pybind11Extension, build_ext | ||
|
||
FILE_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
VERSION = '1.0.1' | ||
# TODO | ||
VERSION = "1.0.2" | ||
|
||
ext_modules = [ | ||
Pybind11Extension('mapbox_earcut', | ||
['src/main.cpp'], | ||
include_dirs=['include'], | ||
define_macros = [('VERSION_INFO', VERSION)], | ||
), | ||
Pybind11Extension( | ||
"mapbox_earcut", | ||
["src/main.cpp"], | ||
include_dirs=["include"], | ||
define_macros=[("VERSION_INFO", VERSION)], | ||
), | ||
] | ||
|
||
def get_readme_contents(): | ||
with open(os.path.join(FILE_DIR, 'README.md'), 'r') as readme_file: | ||
return readme_file.read() | ||
|
||
setup( | ||
name='mapbox_earcut', | ||
version=VERSION, | ||
url='https://github.com/skogler/mapbox_earcut_python', | ||
author='Samuel Kogler', | ||
author_email='[email protected]', | ||
description= | ||
'Python bindings for the mapbox earcut C++ polygon triangulation library.', | ||
long_description=get_readme_contents(), | ||
long_description_content_type='text/markdown', | ||
license='ISC', | ||
ext_modules=ext_modules, | ||
install_requires=['numpy'], | ||
extras_require={'test': 'pytest'}, | ||
cmdclass=dict(build_ext=build_ext), | ||
zip_safe=False, | ||
project_urls={ | ||
'Source': 'https://github.com/skogler/mapbox_earcut_python', | ||
'Original C++ Source': 'https://github.com/mapbox/earcut.hpp', | ||
}, | ||
include_package_data = True | ||
) |
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