Skip to content

Commit

Permalink
Change build system
Browse files Browse the repository at this point in the history
  • Loading branch information
maroba committed Sep 24, 2024
1 parent f66e819 commit 6e602aa
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 55 deletions.
2 changes: 1 addition & 1 deletion findiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- New in version 0.10: Create symbolic representations of finite difference schemes
"""

__version__ = '0.10.1'
__version__ = "0.10.2"

from .coefs import coefficients
from .operators import FinDiff, Coef, Identity, Coefficient
Expand Down
36 changes: 35 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# pyproject.toml
[project]
name = "findiff"
authors = [
{ name = "Matthias Baer", email = "matthias.r.baer@googlemail.com" },
]
description = "A Python package for finite difference derivatives in any number of dimensions."
dynamic = ["version"]
readme = "README.md"
dependencies = [
"numpy",
"scipy",
"sympy"
]
requires-python = ">=3.8"
keywords = ["finite-differences", "numerical-derivatives", "scientific-computing"]
classifiers = [
"Programming Language :: Python :: 3",
"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",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project.urls]
Homepage = "https://github.com/maroba/findiff"
Issues = "https://github.com/maroba/findiff/issues"

[tool.setuptools.dynamic]
version = { attr = "findiff.__version__" }
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

50 changes: 2 additions & 48 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
import re

from setuptools import setup, find_packages

name = 'findiff'


def get_version():
file_name = os.path.join(name, '__init__.py')
with open(file_name) as init_file:
content = init_file.readlines()
for line in content:
match = re.match('^ *__version__ *= *[\'"]([^\'"]+)', line)
if match:
return match.group(1)
raise Exception('Could not parse version string.')


setup(
name=name,
version=get_version(),
description='A Python package for finite difference derivatives in any number of dimensions.',
name="findiff",
packages=find_packages(where=".", include=["findiff*"]),
long_description="""A Python package for finite difference derivatives in any number of dimensions.
Features:
Expand All @@ -41,31 +22,4 @@ def get_version():
* _New in version 0.9:_ Generate differential operators for generic stencils
* _New in version 0.10:_ Create symbolic representations of finite difference schemes
""",

license='MIT',
url='https://github.com/maroba/findiff',

author='Matthias Baer',
author_email='matthias.r.baer@googlemail.com',

classifiers=[
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering :: Mathematics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'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',
],
keywords=['finite-differences', 'numerical-derivatives', 'scientific-computing'],
packages=find_packages(exclude=("tests",)),
package_dir={name: name},
include_package_data=True,
install_requires=['numpy', 'scipy', 'sympy'],
setup_requires=["pytest-runner"],
python_requires=">=3.8",
tests_require=["pytest"],
platforms=['ALL'],
)

0 comments on commit 6e602aa

Please sign in to comment.