From 363d56d49da96b36825282309a02e1a13809838d Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 10 Jun 2022 12:46:20 +0200 Subject: [PATCH] Enabled pure-python build --- Makefile | 11 ++++++++++- setup.py | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 144ca07..6fe3dc7 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/setup.py b/setup.py index 63d9094..241af6f 100644 --- a/setup.py +++ b/setup.py @@ -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("

", "

"+pure_notice) else: pkg_name = "rns" requirements = ['cryptography>=3.4.7', 'pyserial>=3.5', 'netifaces']