Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
setuptools >= 48.0
pytest >= 5.1
flake8 >= 3.7
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 14 additions & 1 deletion tests/test_data.py
Original file line number Diff line number Diff line change
@@ -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")