Skip to content

Replace SCon with modern build tools, rewrite setup.py and add pyproject.toml #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 0 additions & 177 deletions SConstruct

This file was deleted.

80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[build-system]
requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0", "numpy"]
build-backend = "setuptools.build_meta"

[project]
name = "diffpy.srreal"
dynamic=['version', 'dependencies']
authors = [
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
]
maintainers = [
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
]
description = "calculators for PDF, bond valence sum, and other quantities based on atom pair interaction"
keywords = ['PDF BVS atom overlap calculator real-space']
readme = "README.rst"
requires-python = ">=3.11, <3.14"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Chemistry',
]

[project.urls]
Homepage = "https://github.com/diffpy/diffpy.srreal/"
Issues = "https://github.com/diffpy/diffpy.srreal/issues/"

[tool.setuptools-git-versioning]
enabled = true
template = "{tag}"
dev_template = "{tag}"
dirty_template = "{tag}"

[tool.setuptools.packages.find]
where = ["src"] # list of folders that contain the packages (["."] by default)
include = ["*"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)

[tool.setuptools.dynamic]
dependencies = {file = ["requirements/pip.txt"]}

[tool.codespell]
exclude-file = ".codespell/ignore_lines.txt"
ignore-words = ".codespell/ignore_words.txt"
skip = "*.cif,*.dat"

[tool.black]
line-length = 115
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| \.rst
| \.txt
| _build
| buck-out
| build
| dist

# The following are specific to Black, you probably don't want those.
| blib2to3
| tests/data
)/
'''
2 changes: 2 additions & 0 deletions requirements/build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python
setuptools
3 changes: 3 additions & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpy
boost
diffpy.structure
4 changes: 4 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx
sphinx_rtd_theme
doctr
m2r
Empty file added requirements/pip.txt
Empty file.
6 changes: 6 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
flake8
pytest
codecov
coverage
pytest-cov
pytest-env
Loading