Skip to content

Commit

Permalink
Fix source release: include mbedTLS source...
Browse files Browse the repository at this point in the history
And do not automatically `rm -rf` the `nng` and `mbedtls` directories if
they are present.

This will make developing pynng more error-prone--it will be easier to
accidentally build against a stale library--but it is the Right Thing™
and allows source distributions to build.
  • Loading branch information
codypiersall committed Sep 13, 2020
1 parent b75c58b commit d4b3061
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include *.sh *.py *.bat 8.txt *.md
include *.h
include LICENSE.txt
recursive-include nng *
recursive-include mbedtls *
recursive-include test *.py
recursive-include pynng *.py
prune nng/build
Expand Down
2 changes: 1 addition & 1 deletion pynng/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file is imported from __init__.py and exec'd from setup.py

__version__ = "0.6.1"
__version__ = "0.6.2"
22 changes: 10 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ def build_mbedtls(cmake_args):
"""
do = check_call
if os.path.exists('mbedtls'):
_rmdir('mbedtls')
do('git clone --recursive {}'.format(MBEDTLS_REPO), shell=True)
# for local hacking, just copy a directory (network connection is slow)
# do('cp -r ../mbedtls mbedtls', shell=True)
do('git checkout {}'.format(MBEDTLS_REV), shell=True, cwd='mbedtls')
if not os.path.exists('mbedtls'):
do('git clone --recursive {}'.format(MBEDTLS_REPO), shell=True)
# for local hacking, just copy a directory (network connection is slow)
# do('cp -r ../mbedtls mbedtls', shell=True)
do('git checkout {}'.format(MBEDTLS_REV), shell=True, cwd='mbedtls')
cwd = 'mbedtls/build'
os.mkdir(cwd)
cmake_cmd = ['cmake'] + cmake_args
Expand All @@ -64,12 +63,11 @@ def build_nng(cmake_args):
"""
do = check_call
if os.path.exists('nng'):
_rmdir('nng')
do('git clone {}'.format(NNG_REPO), shell=True)
# for local hacking, just copy a directory (network connection is slow)
# do('cp -r ../nng-clean nng', shell=True)
do('git checkout {}'.format(NNG_REV), shell=True, cwd='nng')
if not os.path.exists('nng'):
do('git clone {}'.format(NNG_REPO), shell=True)
# for local hacking, just copy a directory (network connection is slow)
# do('cp -r ../nng-clean nng', shell=True)
do('git checkout {}'.format(NNG_REV), shell=True, cwd='nng')
os.mkdir('nng/build')
cmake_cmd = ['cmake'] + cmake_args
cmake_cmd += [
Expand Down

0 comments on commit d4b3061

Please sign in to comment.