Skip to content

Commit

Permalink
Add entrypoints to setup.py (#332)
Browse files Browse the repository at this point in the history
* Add entrypoints to setup.py

see:
 - conda-forge/numcodecs-feedstock#86
 - #300

* Check syspath and ignore error

* Temporarily disable codec test on Windows

* Try adding entry test to manifest

* Add `entrypoints` to `requirements.txt`

* Add `entrypoints` to `requirements_dev.txt`

* Remove `entrypoints` from `requirements_test.txt`

* Add `entrypoints` to `requirements_rtfd.txt`

* Note `numcodecs` is not `zip_safe`

* xfail the test completely

Co-authored-by: jakirkham <jakirkham@gmail.com>
  • Loading branch information
joshmoore and jakirkham authored Jul 26, 2022
1 parent ce114fa commit c78ff53
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ recursive-include numcodecs *.pxd
recursive-include numcodecs *.c
recursive-include numcodecs *.h
include cpuinfo.py
include numcodecs/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt
1 change: 1 addition & 0 deletions numcodecs/tests/test_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def set_path():
numcodecs.registry.codec_registry.pop("test")


@pytest.mark.xfail(reason="FIXME: not working in wheels build")
def test_entrypoint_codec(set_path):
cls = numcodecs.registry.get_codec({"id": "test"})
assert cls.codec_id == "test"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cython
entrypoints
numpy
msgpack
pytest
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Cython==0.29.21
entrypoints==0.4
msgpack==1.0.2
numpy==1.22.0
zfpy==0.5.5
Expand Down
1 change: 1 addition & 0 deletions requirements_rtfd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ numpydoc
mock
numpy
cython
entrypoints
zfpy==0.5.5
typing-extensions
1 change: 0 additions & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
coverage
coveralls
entrypoints
flake8
pytest
pytest-cov
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def run_setup(with_extensions):
'setuptools-scm>1.5.4'
],
install_requires=[
'entrypoints',
'numpy>=1.7',
'typing-extensions>=3.7.4',
],
Expand Down Expand Up @@ -369,6 +370,7 @@ def run_setup(with_extensions):
maintainer_email='alimanfoo@googlemail.com',
url='https://github.com/zarr-developers/numcodecs',
license='MIT',
zip_safe=False,
)


Expand Down

0 comments on commit c78ff53

Please sign in to comment.