go2: test

go: rolling_checksum_py_mod.py test-publish

rolling_checksum_py_mod.py: ../rolling_checksum_mod.m4
	m4 -Dpy=1 < ../rolling_checksum_mod.m4 > rolling_checksum_py_mod.py

publish: clean rolling_checksum_py_mod.py
	python3 setup.py sdist
	twine upload dist/*

test-publish: clean rolling_checksum_py_mod.py
	python3 setup.py sdist bdist_wheel
	twine upload --repository-url https://test.pypi.org/legacy/ dist/*

rcm-input-data:
	../gen-rcm-input-data > rcm-input-data

test: rolling_checksum_py_mod.py rcm-input-data
	pypy3 ../test-rolling_checksum_mod --pure-python
	python3 ../test-rolling_checksum_mod --pure-python
	
clean:
	rm -rf build dist rolling_checksum_py_mod.egg-info rcm-input-data __pycache__