-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduced pyproject.toml file; simplified setup.py and MANIFEST.in f…
…iles
- Loading branch information
1 parent
ffe6016
commit 75c8e18
Showing
3 changed files
with
59 additions
and
52 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 |
---|---|---|
@@ -1,7 +1 @@ | ||
# C/cython source files | ||
include jenkspy/src/* | ||
|
||
include README.md | ||
include LICENSE | ||
include tests/*.* | ||
include requirements.txt | ||
graft tests |
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,55 @@ | ||
[build-system] | ||
requires = ["setuptools >= 61.0", "Cython"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = 'jenkspy' | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"numpy" | ||
] | ||
requires-python = ">= 3.6" | ||
authors = [ | ||
{name = "Matthieu Viry", email = "matthieu.viry@cnrs.fr"}, | ||
] | ||
maintainers = [ | ||
{name = "Matthieu Viry", email = "matthieu.viry@cnrs.fr"}, | ||
] | ||
description = "Compute Natural Breaks (Fisher-Jenks algorithm)" | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
|
||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Development Status :: 5 - Production/Stable", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Typing :: Typed", | ||
] | ||
|
||
|
||
[project.urls] | ||
Homepage = "https://github.com/mthh/jenkspy" | ||
Repository = "https://github.com/mthh/jenkspy.git" | ||
Issues = "https://github.com/mthh/jenkspy/issues" | ||
Changelog = "https://github.com/mthh/jenkspy/blob/master/CHANGES.rst" | ||
|
||
[tool.setuptools] | ||
packages = ["jenkspy"] | ||
include-package-data = false | ||
|
||
|
||
[tool.setuptools.package-data] | ||
jenkspy = ["src/*"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "jenkspy.__version__"} | ||
readme = {file = "README.md", content-type = "text/x-rst"} |
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,61 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from distutils.core import setup | ||
from distutils.extension import Extension | ||
from ast import parse | ||
from os import path | ||
|
||
from Cython.Distutils import build_ext | ||
from Cython.Build import cythonize | ||
|
||
ext = '.pyx' | ||
from Cython.Distutils import build_ext | ||
|
||
exts = [ | ||
Extension( | ||
"jenkspy.jenks", | ||
["jenkspy/src/jenks" + ext], | ||
["jenkspy/src/jenks.pyx"], | ||
["jenkspy"], | ||
) | ||
] | ||
|
||
with open(path.join('jenkspy', '__init__.py')) as f: | ||
__version__ = parse(next(filter(lambda line: line.startswith('__version__'), | ||
f))).body[0].value.s | ||
|
||
with open('README.md') as f: | ||
long_desc = f.read() | ||
|
||
with open('requirements.txt') as f: | ||
requirements = f.read().splitlines() | ||
|
||
setup( | ||
name='jenkspy', | ||
version=__version__, | ||
license="MIT", | ||
ext_modules=cythonize(exts), | ||
cmdclass={'build_ext': build_ext}, | ||
packages=["jenkspy"], | ||
include_package_data=True, | ||
description="Compute Natural Breaks (Fisher-Jenks algorithm)", | ||
long_description=long_desc, | ||
long_description_content_type='text/x-rst', | ||
install_requires=requirements, | ||
test_suite="tests", | ||
author="Matthieu Viry", | ||
author_email="matthieu.viry@cnrs.fr", | ||
url='https://github.com/mthh/jenkspy', | ||
classifiers=[ | ||
"Programming Language :: Python", | ||
"Development Status :: 5 - Production/Stable", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Typing :: Typed", | ||
], | ||
cmdclass={'build_ext': build_ext} | ||
) |