diff --git a/Makefile b/Makefile index 216dbd4..caa12ae 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ install: CYTHONIZE=1 pip install . install-from-source: dist - pip install dist/cython-package-example-0.1.6.tar.gz + pip install dist/cython-package-example-0.1.7.tar.gz clean: $(RM) -r build dist src/*.egg-info diff --git a/requirements-dev.txt b/requirements-dev.txt index aa64289..1006645 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,3 @@ +setuptools >= 48.0 pytest >= 5.1 flake8 >= 3.7 diff --git a/setup.cfg b/setup.cfg index 72bcf1e..9e01462 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cython-package-example -version = 0.1.6 +version = 0.1.7 description = Example of a package with Cython extensions long_description = file: README.md long_description_content_type = text/markdown diff --git a/setup.py b/setup.py index 9b426ad..207b43a 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import os -from setuptools import setup, find_packages, Extension +from setuptools import setup, Extension try: from Cython.Build import cythonize diff --git a/tests/test_data.py b/tests/test_data.py index adb1dc1..b6bc30e 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,7 +1,20 @@ from subprocess import check_output +import sys from cypack.answer import zen_hash def test_zen_hash(): - md5sum = check_output(["md5sum", "src/cypack/data/zen.txt"]).split(maxsplit=1)[0] + if sys.platform.startswith("darwin"): + md5sum = check_output(["md5", + "src/cypack/data/zen.txt"] + ).split(b'=')[-1].strip() + elif sys.platform.startswith("win"): + md5sum = check_output(["certutil", + "-hashfile", + r"src\cypack\data\zen.txt", + "md5"]).splitlines()[1] + else: + md5sum = check_output(["md5sum", + "src/cypack/data/zen.txt"] + ).split(maxsplit=1)[0] assert md5sum == zen_hash().encode("ascii")