Enabled pure-python build

This commit is contained in:
Mark Qvist 2022-06-10 12:46:20 +02:00
parent 2a581a9a9b
commit 363d56d49d
2 changed files with 13 additions and 1 deletions

View File

@ -19,11 +19,20 @@ create_symlinks:
-ln -s ../RNS ./Examples/
-ln -s ../../RNS ./RNS/Utilities/
build_sdist_only:
python3 setup.py sdist
build_wheel:
python3 setup.py sdist bdist_wheel
release: test remove_symlinks build_wheel create_symlinks
build_pure_wheel:
python3 setup.py sdist bdist_wheel --pure
release: remove_symlinks build_wheel build_pure_wheel create_symlinks
upload:
@echo Ready to publish release, hit enter to continue
@read VOID
@echo Uploading to PyPi...
twine upload dist/*
@echo Release published

View File

@ -2,6 +2,8 @@ import setuptools
import sys
pure_python = False
pure_notice = "\n\n**Warning!** *This package is the zero-dependency version of Reticulum. You should almost certainly use the [normal package](https://pypi.org/project/rns) instead. Do NOT install this package unless you know exactly why you are doing it!*"
if '--pure' in sys.argv:
pure_python = True
sys.argv.remove('--pure')
@ -15,6 +17,7 @@ with open("README.md", "r") as fh:
if pure_python:
pkg_name = "rnspure"
requirements = []
long_description = long_description.replace("</p>", "</p>"+pure_notice)
else:
pkg_name = "rns"
requirements = ['cryptography>=3.4.7', 'pyserial>=3.5', 'netifaces']