Skip to content

Commit 5287c7b

Browse files
authored
add pyproject.toml (pydata#4897)
* add a initial pyproject.toml file * reformat the toml file * use setuptools_scm_git_archive to support git archives * add entries for whats-new.rst * remove setup_requires * require setuptools >= 42 since that's required for using pyproject.toml * add a fallback version
1 parent eb7e112 commit 5287c7b

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

.git_archival.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref-names: $Format:%D$

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# reduce the number of merge conflicts
22
doc/whats-new.rst merge=union
3+
# allow installing from git archives
4+
.git_archival.txt export-subst

doc/whats-new.rst

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Breaking changes
3434

3535
(:issue:`4688`, :pull:`4720`)
3636
By `Justus Magin <https://github.com/keewis>`_.
37+
- use ``pyproject.toml`` instead of the ``setup_requires`` option for
38+
``setuptools`` (:pull:`4897`).
39+
By `Justus Magin <https://github.com/keewis>`_.
3740
- As a result of :pull:`4684` the default units encoding for
3841
datetime-like values (``np.datetime64[ns]`` or ``cftime.datetime``) will now
3942
always be set such that ``int64`` values can be used. In the past, no units
@@ -86,6 +89,8 @@ New Features
8689
- :py:meth:`DataArray.swap_dims` & :py:meth:`Dataset.swap_dims` now accept dims
8790
in the form of kwargs as well as a dict, like most similar methods.
8891
By `Maximilian Roos <https://github.com/max-sixty>`_.
92+
- Allow installing from git archives (:pull:`4897`).
93+
By `Justus Magin <https://github.com/keewis>`_.
8994

9095
- :py:func:`open_dataset` and :py:func:`open_mfdataset` now accept ``fsspec`` URLs
9196
(including globs for the latter) for ``engine="zarr"``, and so allow reading from

pyproject.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel",
5+
"setuptools_scm[toml]>=3.4",
6+
"setuptools_scm_git_archive",
7+
]
8+
build-backend = "setuptools.build_meta"
9+
10+
[tool.setuptools_scm]
11+
fallback_version = "999"

setup.cfg

-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ install_requires =
7777
numpy >= 1.15
7878
pandas >= 0.25
7979
setuptools >= 40.4 # For pkg_resources
80-
setup_requires =
81-
setuptools >= 40.4
82-
setuptools_scm
83-
8480

8581
[options.extras_require]
8682
io =

0 commit comments

Comments
 (0)