python_version=3.9 # This is only used when using the 'make-install' rule. python3 setup.py ignores it. install_dir=/usr/local/lib/python$(python_version)/dist-packages go: \ pyx_treap.c python${python_version} setup.py build go3: ./compare-to-dict > t.csv to-table -d < t.csv > t.html pyx_treap.pyx: ../m4_treap.m4 m4 -Dpyx=1 < ../m4_treap.m4 > pyx_treap.pyx pyx_treap.so: pyx_treap.o gcc -shared pyx_treap.o -o pyx_treap.so pyx_treap.o: pyx_treap.c gcc -c -fPIC -I /usr/local/cpython-$(python_version)/include/python$(python_version) pyx_treap.c pyx_treap.c: pyx_treap.pyx python${python_version} -m cython pyx_treap.pyx install: python${python_version} setup.py install make-install: install -d $(install_dir) install -m 644 treap.py $(install_dir) install -m 644 nest.py $(install_dir) clean: rm -f *.pyc *.so *.o core MANIFEST rm -rf build dist rm -rf __pycache__ rm -rf pyx_treap.egg-info veryclean: clean rm -f *.c pyx_treap.pyx publish: clean pyx_treap.c python3 setup.py sdist twine upload --verbose dist/*.tar.gz test-publish: veryclean pyx_treap.c python3 setup.py sdist bdist_wheel twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*.tar.gz