Tweaks to pypi package
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
libzt PyPI Package
|
## libzt PyPI Package
|
||||||
[pypi/libzt](https://pypi.python.org/pypi/libzt)
|
[pypi/libzt](https://pypi.python.org/pypi/libzt)
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -27,6 +27,8 @@ Get necessary tools
|
|||||||
|
|
||||||
`pip3 install wheel twine`
|
`pip3 install wheel twine`
|
||||||
|
|
||||||
|
*Note: As there appears to be no way to differentiate C and C++ code (and thus pass correct build args to each type) in a setuptools script we must separately build the `lwip` and `http_parser` libraries, copy them here, and then build the binary. See the top-level [README.md](../../README.md) for instructions on how to do that*
|
||||||
|
|
||||||
Build the binary distribution wheel:
|
Build the binary distribution wheel:
|
||||||
|
|
||||||
`python3 setup.py bdist_wheel`
|
`python3 setup.py bdist_wheel`
|
||||||
|
|||||||
@@ -14,36 +14,35 @@ source_list.extend(list(glob.glob('../../zto/osdep/*.cpp')))
|
|||||||
source_list.extend(list(glob.glob('../../zto/service/*.cpp')))
|
source_list.extend(list(glob.glob('../../zto/service/*.cpp')))
|
||||||
source_list.extend(list(glob.glob('../../zto/controller/*.cpp')))
|
source_list.extend(list(glob.glob('../../zto/controller/*.cpp')))
|
||||||
|
|
||||||
http_parser_source_list = list(glob.glob('../../zto/ext/http-parser/*.c'))
|
#http_parser_source_list = ['libzt_wrap.cxx']
|
||||||
|
#http_parser_source_list.extend(list(glob.glob('../../zto/ext/http-parser/*.c')))
|
||||||
lwip_source_list = []
|
#lwip_source_list = ['libzt_wrap.cxx']
|
||||||
|
#lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/*.c')))
|
||||||
lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/*.c')))
|
#lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/ipv4/*.c')))
|
||||||
lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/ipv4/*.c')))
|
#lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/ipv6/*.c')))
|
||||||
lwip_source_list.extend(list(glob.glob('../../ext/lwip/src/core/ipv6/*.c')))
|
|
||||||
|
|
||||||
source_list = list(set(source_list)-set(
|
source_list = list(set(source_list)-set(
|
||||||
['../../zto/osdep/LinuxEthernetTap.cpp','../../zto/osdep/BSDEthernetTap.cpp','../../zto/osdep/OSXEthernetTap.cpp', '../../zto/osdep/WindowsEthernetTap.cpp']))
|
['../../zto/osdep/LinuxEthernetTap.cpp','../../zto/osdep/BSDEthernetTap.cpp','../../zto/osdep/OSXEthernetTap.cpp', '../../zto/osdep/WindowsEthernetTap.cpp']))
|
||||||
|
|
||||||
lwip_module = Extension('lwip',
|
#lwip_module = Extension('lwip',
|
||||||
extra_compile_args=['-DZT_SDK'],
|
# extra_compile_args=['-DZT_SDK'],
|
||||||
extra_link_args=[],
|
# extra_link_args=[],
|
||||||
sources=lwip_source_list,
|
# sources=lwip_source_list,
|
||||||
include_dirs=['../include',
|
# include_dirs=['../include',
|
||||||
'../../include',
|
# '../../include',
|
||||||
'../../ext/lwip/src/include',
|
# '../../ext/lwip/src/include',
|
||||||
'../../ext/lwip-contrib/ports/unix/include',]
|
# '../../ext/lwip-contrib/ports/unix/include',]
|
||||||
)
|
# )
|
||||||
|
|
||||||
http_parser_module = Extension('http_parser',
|
#http_parser_module = Extension('http_parser',
|
||||||
extra_compile_args=[],
|
# extra_compile_args=[],
|
||||||
extra_link_args=[],
|
# extra_link_args=[],
|
||||||
sources=http_parser_source_list,
|
# sources=http_parser_source_list,
|
||||||
)
|
# )
|
||||||
|
|
||||||
example_module = Extension('libzt',
|
libzt_module = Extension('libzt',
|
||||||
extra_compile_args=['-std=c++11', '-DZT_SDK', '-DZT_SOFTWARE_UPDATE_DEFAULT=\"disable\"'],
|
extra_compile_args=['-std=c++11', '-DZT_SDK', '-DZT_SOFTWARE_UPDATE_DEFAULT=\"disable\"'],
|
||||||
extra_link_args=[],
|
extra_link_args=['-L.','-llwip','-lhttp'],
|
||||||
sources=source_list,
|
sources=source_list,
|
||||||
include_dirs=['../include',
|
include_dirs=['../include',
|
||||||
'../../include',
|
'../../include',
|
||||||
@@ -59,11 +58,11 @@ example_module = Extension('libzt',
|
|||||||
setup(
|
setup(
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
distclass=BinaryDistribution,
|
distclass=BinaryDistribution,
|
||||||
ext_modules = [example_module, http_parser_module, lwip_module],
|
ext_modules = [libzt_module],
|
||||||
py_modules = ['libzt'],
|
py_modules = ['libzt'],
|
||||||
name = 'libzt',
|
name = 'libzt',
|
||||||
packages = ['libzt'],
|
packages = ['libzt'],
|
||||||
version = '1.1.5a12',
|
version = '1.1.5a14',
|
||||||
description = 'ZeroTier, in library form.',
|
description = 'ZeroTier, in library form.',
|
||||||
long_description = 'Encrypted P2P networks between your applications',
|
long_description = 'Encrypted P2P networks between your applications',
|
||||||
author = 'ZeroTier, Inc.',
|
author = 'ZeroTier, Inc.',
|
||||||
|
|||||||
Reference in New Issue
Block a user