Skip to content

Commit

Permalink
add pyproject.toml (pydata#4897)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
keewis authored Feb 21, 2021
1 parent eb7e112 commit 5287c7b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# reduce the number of merge conflicts
doc/whats-new.rst merge=union
# allow installing from git archives
.git_archival.txt export-subst
5 changes: 5 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Breaking changes

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

- :py:func:`open_dataset` and :py:func:`open_mfdataset` now accept ``fsspec`` URLs
(including globs for the latter) for ``engine="zarr"``, and so allow reading from
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"setuptools_scm[toml]>=3.4",
"setuptools_scm_git_archive",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
fallback_version = "999"
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ install_requires =
numpy >= 1.15
pandas >= 0.25
setuptools >= 40.4 # For pkg_resources
setup_requires =
setuptools >= 40.4
setuptools_scm


[options.extras_require]
io =
Expand Down

0 comments on commit 5287c7b

Please sign in to comment.