Skip to content

Commit 1da4ff6

Browse files
committed
Update README and add third-party notices for licensing compliance; correct project URLs in pyproject.toml
1 parent 992f688 commit 1da4ff6

3 files changed

Lines changed: 74 additions & 29 deletions

File tree

Readme.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# cpp_hf — Fast Hartree–Fock on k‑grids (FFTW + Eigen + pybind11)
22

3+
[![PyPI](https://img.shields.io/pypi/v/cpp-hf.svg)](https://pypi.org/project/cpp-hf/)
4+
[![Python](https://img.shields.io/pypi/pyversions/cpp-hf.svg)](https://pypi.org/project/cpp-hf/)
5+
[![Wheel](https://img.shields.io/pypi/wheel/cpp-hf.svg)](https://pypi.org/project/cpp-hf/#files)
6+
[![License](https://img.shields.io/pypi/l/cpp-hf.svg)](LICENSE)
7+
[![Release](https://github.com/skilledwolf/cpp_hf/actions/workflows/release.yml/badge.svg)](https://github.com/skilledwolf/cpp_hf/actions/workflows/release.yml)
8+
39
cpp_hf provides a compiled extension module exposing a fast Hartree–Fock
410
self‑consistent field (SCF) loop for uniform 2D k‑grids. It uses
511
FFTW (batched 2D complex DFTs), Eigen (Hermitian eigendecompositions), and
@@ -13,28 +19,41 @@ pybind11 to bind the C++ implementation to Python.
1319
This package is designed to interoperate with ContiMod, but it can be used on
1420
its own as a lightweight HF kernel.
1521

22+
Project links:
23+
- PyPI: https://pypi.org/project/cpp-hf/
24+
- Source: https://github.com/skilledwolf/cpp_hf
25+
1626
## Installation
1727

18-
Prerequisites:
28+
Quick install (prebuilt wheel if available):
29+
```
30+
pip install cpp-hf
31+
```
32+
33+
Notes:
34+
- The import name is `cpp_hf` (underscore), even though the package name uses a hyphen.
35+
- Wheels may not be available for all platforms/Python versions yet; in that case pip will build from source.
36+
37+
Build from source (requirements):
1938
- Python 3.8+
2039
- A C++17 compiler
21-
- FFTW (with threads recommended) and headers
40+
- FFTW and headers (threads variant optional)
2241
- CMake ≥ 3.21
2342

24-
Install from source (recommended during development):
25-
43+
Build via pip (with optional CMake flags):
2644
```
27-
# Optional: choose features via -C flags
2845
pip install . \
2946
-C cmake.define.HF_USE_OPENMP=ON \
3047
-C cmake.define.HF_USE_FFTW_THREADS=ON
3148
```
3249

33-
If you have Homebrew on macOS:
50+
macOS (Homebrew) dependencies:
3451
```
3552
brew install fftw eigen cmake
3653
```
3754

55+
If FFTW is not found, set one of `PKG_CONFIG_PATH`, `FFTW3_DIR`, or `CMAKE_PREFIX_PATH` to point to your installation.
56+
3857
The repo includes a convenience script that activates a conda env and builds:
3958
```
4059
sh build_install.sh
@@ -90,29 +109,11 @@ hartreefock_iteration_cpp(
90109
- Returns the converged density `P`, mean‑field `F`, total energy, chemical
91110
potential, and the iteration count.
92111

93-
## Building wheels / releasing to PyPI
94-
95-
We use scikit‑build‑core, so building wheels is standard:
96-
97-
```
98-
python -m pip install build twine
99-
python -m build # creates dist/*.whl and dist/*.tar.gz
100-
python -m twine upload dist/*
101-
```
102-
103-
To test upload to TestPyPI first:
104-
```
105-
python -m twine upload --repository testpypi dist/*
106-
# then install with
107-
pip install -i https://test.pypi.org/simple/ cpp_hf
108-
```
109-
110-
Note: the name `cpp_hf` must be available on PyPI. If it’s taken, consider a
111-
unique name such as `contimod-cpp-hf` and update `pyproject.toml` accordingly.
112-
113112
## License
114113

115-
MIT — see `LICENSE`.
114+
GPLv2+ — see `LICENSE`.
115+
116+
Third‑party notices: see `THIRD_PARTY_NOTICES.md`.
116117

117118
## Acknowledgments
118119

THIRD_PARTY_NOTICES.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Third-Party Notices for cpp_hf
2+
3+
This project links against and/or uses the following third-party components.
4+
Observe their licenses when redistributing binaries or derivative works. If you
5+
distribute wheels that link these libraries, the combined work must comply with
6+
their licenses (notably GPLv2+ for FFTW when linked).
7+
8+
- FFTW — GNU General Public License v2 or later (GPLv2+)
9+
- URL: http://www.fftw.org/
10+
- License: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11+
- Eigen — Mozilla Public License 2.0 (MPL-2.0)
12+
- URL: https://gitlab.com/libeigen/eigen
13+
- License: https://www.mozilla.org/en-US/MPL/2.0/
14+
- pybind11 — BSD 3-Clause
15+
- URL: https://github.com/pybind/pybind11
16+
- License: https://github.com/pybind/pybind11/blob/master/LICENSE
17+
- Boost Headers — Boost Software License 1.0
18+
- URL: https://www.boost.org/
19+
- License: https://www.boost.org/users/license.html
20+
- NumPy (Python C API integration) — BSD 3-Clause
21+
- URL: https://github.com/numpy/numpy
22+
- License: https://numpy.org/doc/stable/license.html
23+
24+
Optional/conditional components (depending on build flags and platform):
25+
- OpenMP runtime (LLVM libomp or GCC libgomp) — typically Apache 2.0 with LLVM
26+
exceptions (libomp) or GPL/LGPL terms (libgomp). These are not bundled by
27+
default wheels unless explicitly included by your build.
28+
29+
If you believe a third-party component is missing from this list, please open
30+
an issue or pull request.
31+

pyproject.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ classifiers = [
2828
]
2929

3030
[project.urls]
31-
Homepage = "https://github.com/contimod/cpp_hf"
32-
Issues = "https://github.com/contimod/cpp_hf/issues"
31+
Homepage = "https://github.com/skilledwolf/cpp_hf"
32+
Issues = "https://github.com/skilledwolf/cpp_hf/issues"
3333

3434
[tool.scikit-build]
3535
# Optional: produce a per-tag build dir (nice for local dev)
@@ -51,3 +51,16 @@ provider = "scikit_build_core.metadata.setuptools_scm"
5151
version_scheme = "guess-next-dev"
5252
local_scheme = "node-and-date"
5353
fallback_version = "0.0"
54+
55+
[tool.scikit-build.wheel]
56+
# Ensure license and notices are embedded in the wheel metadata
57+
license-files = [
58+
"LICENSE",
59+
"THIRD_PARTY_NOTICES.md",
60+
]
61+
62+
[tool.scikit-build.sdist]
63+
# Ensure third-party notices are included in the source distribution
64+
include = [
65+
"THIRD_PARTY_NOTICES.md",
66+
]

0 commit comments

Comments
 (0)