Skip to content

Commit c78ff53

Browse files
joshmoorejakirkham
andauthored
Add entrypoints to setup.py (#332)
* 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>
1 parent ce114fa commit c78ff53

7 files changed

+7
-1
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ recursive-include numcodecs *.pxd
44
recursive-include numcodecs *.c
55
recursive-include numcodecs *.h
66
include cpuinfo.py
7+
include numcodecs/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt

numcodecs/tests/test_entrypoints.py

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def set_path():
2020
numcodecs.registry.codec_registry.pop("test")
2121

2222

23+
@pytest.mark.xfail(reason="FIXME: not working in wheels build")
2324
def test_entrypoint_codec(set_path):
2425
cls = numcodecs.registry.get_codec({"id": "test"})
2526
assert cls.codec_id == "test"

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cython
2+
entrypoints
23
numpy
34
msgpack
45
pytest

requirements_dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Cython==0.29.21
2+
entrypoints==0.4
23
msgpack==1.0.2
34
numpy==1.22.0
45
zfpy==0.5.5

requirements_rtfd.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ numpydoc
66
mock
77
numpy
88
cython
9+
entrypoints
910
zfpy==0.5.5
1011
typing-extensions

requirements_test.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
coverage
22
coveralls
3-
entrypoints
43
flake8
54
pytest
65
pytest-cov

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ def run_setup(with_extensions):
337337
'setuptools-scm>1.5.4'
338338
],
339339
install_requires=[
340+
'entrypoints',
340341
'numpy>=1.7',
341342
'typing-extensions>=3.7.4',
342343
],
@@ -369,6 +370,7 @@ def run_setup(with_extensions):
369370
maintainer_email='alimanfoo@googlemail.com',
370371
url='https://github.com/zarr-developers/numcodecs',
371372
license='MIT',
373+
zip_safe=False,
372374
)
373375

374376

0 commit comments

Comments
 (0)