Browse Source

Updated PyPI (python) build script

pull/1/head
Joseph Henry 8 years ago
parent
commit
b08b856389
  1. 8
      packages/pypi/MANIFEST.in
  2. 13
      packages/pypi/Makefile
  3. 2
      packages/pypi/README.rst
  4. 2
      packages/pypi/libzt.i
  5. 2
      packages/pypi/libzt_wrap.cxx
  6. 37
      packages/pypi/setup.py

8
packages/pypi/MANIFEST.in

@ -2,9 +2,9 @@
README.rst README.rst
setup.cfg setup.cfg
setup.py setup.py
recursive-include data *.c #recursive-include ../../src *.c
recursive-include data *.cpp recursive-include ../../src *.cpp
recursive-include data *.h recursive-include ../../include *.h
recursive-include data *.hpp #recursive-include ../../include *.hpp
include libhttp.a include libhttp.a
include liblwip.a include liblwip.a

13
packages/pypi/Makefile

@ -0,0 +1,13 @@
bdist:
cd ../../; cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=DEBUG; cmake --build build
cp ../../bin/lib/*.a .
python3 setup.py bdist_wheel
upload:
twine upload dist/*
clean:
rm -rf *.a
rm -rf build
rm -rf dist
rm -rf libzt.egg-info

2
packages/pypi/README.rst

@ -1,5 +1,5 @@
# libzt # libzt
*Embed ZeroTier directly into your app* *ZeroTier: Encrypted P2P communication between apps and services*
*** ***
A library version of [ZeroTier](https://github.com/zerotier/ZeroTierOne), **libzt** makes it easy to securely connect devices, servers, cloud VMs, containers, and apps everywhere and manage them at scale. Now you can bake this ability directly into your app or service using your preferred language. We provide a POSIX-like socket API supporting `SOCK_STREAM`, `SOCK_DGRAM`, and `SOCK_RAW` to make the integration simple. There's no need for system-wide virtual interfaces. This connection is exclusive to your app and fully encrypted via the [Salsa20](https://en.wikipedia.org/wiki/Salsa20) cipher. For a more in-depth discussion on the technical side of ZeroTier, check out our [Manual](https://www.zerotier.com/manual.shtml?pk_campaign=github_libzt) A library version of [ZeroTier](https://github.com/zerotier/ZeroTierOne), **libzt** makes it easy to securely connect devices, servers, cloud VMs, containers, and apps everywhere and manage them at scale. Now you can bake this ability directly into your app or service using your preferred language. We provide a POSIX-like socket API supporting `SOCK_STREAM`, `SOCK_DGRAM`, and `SOCK_RAW` to make the integration simple. There's no need for system-wide virtual interfaces. This connection is exclusive to your app and fully encrypted via the [Salsa20](https://en.wikipedia.org/wiki/Salsa20) cipher. For a more in-depth discussion on the technical side of ZeroTier, check out our [Manual](https://www.zerotier.com/manual.shtml?pk_campaign=github_libzt)

2
packages/pypi/libzt.i

@ -30,7 +30,7 @@
%{ %{
#define SWIG_FILE_WITH_INIT #define SWIG_FILE_WITH_INIT
#include "data/libzt/include/libzt.h" #include "../../include/libzt.h"
%} %}
int zts_start(const char *path, bool blocking); int zts_start(const char *path, bool blocking);

2
packages/pypi/libzt_wrap.cxx

@ -3130,7 +3130,7 @@ namespace swig {
#define SWIG_FILE_WITH_INIT #define SWIG_FILE_WITH_INIT
#include "data/libzt/include/libzt.h" #include "../../include/libzt.h"
SWIGINTERN swig_type_info* SWIGINTERN swig_type_info*

37
packages/pypi/setup.py

@ -7,12 +7,13 @@ class BinaryDistribution(Distribution):
def is_pure(self): def is_pure(self):
return False return False
projDir='../..'
source_list = ['libzt_wrap.cxx'] source_list = ['libzt_wrap.cxx']
source_list.extend(list(glob.glob('data/libzt/src/*.cpp'))) source_list.extend(list(glob.glob(projDir+'/src/*.cpp')))
source_list.extend(list(glob.glob('data/zto/node/*.cpp'))) source_list.extend(list(glob.glob(projDir+'/zto/node/*.cpp')))
source_list.extend(list(glob.glob('data/zto/osdep/*.cpp'))) source_list.extend(list(glob.glob(projDir+'/zto/osdep/*.cpp')))
source_list.extend(list(glob.glob('data/zto/service/*.cpp'))) source_list.extend(list(glob.glob(projDir+'/zto/service/*.cpp')))
source_list.extend(list(glob.glob('data/zto/controller/*.cpp'))) source_list.extend(list(glob.glob(projDir+'/zto/controller/*.cpp')))
#http_parser_source_list = ['libzt_wrap.cxx'] #http_parser_source_list = ['libzt_wrap.cxx']
#http_parser_source_list.extend(list(glob.glob('../../zto/ext/http-parser/*.c'))) #http_parser_source_list.extend(list(glob.glob('../../zto/ext/http-parser/*.c')))
@ -22,7 +23,7 @@ source_list.extend(list(glob.glob('data/zto/controller/*.cpp')))
#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(
['data/zto/osdep/LinuxEthernetTap.cpp','data/zto/osdep/BSDEthernetTap.cpp','data/zto/osdep/OSXEthernetTap.cpp', 'data/zto/osdep/WindowsEthernetTap.cpp'])) [projDir+'/zto/osdep/LinuxEthernetTap.cpp',projDir+'/zto/osdep/BSDEthernetTap.cpp',projDir+'/zto/osdep/OSXEthernetTap.cpp', projDir+'/zto/osdep/WindowsEthernetTap.cpp']))
#lwip_module = Extension('lwip', #lwip_module = Extension('lwip',
# extra_compile_args=['-DZT_SDK'], # extra_compile_args=['-DZT_SDK'],
@ -44,14 +45,14 @@ 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=['-L.','-llwip','-lhttp'], extra_link_args=['-L.','-llwip','-lhttp'],
sources=source_list, sources=source_list,
include_dirs=['data/libzt/include', include_dirs=[projDir+'/include',
'data/libzt/ext/lwip/src/include', projDir+'/ext/lwip/src/include',
'data/libzt/ext/lwip-contrib/ports/unix/include', projDir+'/ext/lwip-contrib/ports/unix/include',
'data/zto/include', projDir+'/zto/include',
'data/zto/node', projDir+'/zto/node',
'data/zto/service', projDir+'/zto/service',
'data/zto/osdep', projDir+'/zto/osdep',
'data/zto/controller'] projDir+'/zto/controller']
) )
setup( setup(
@ -61,14 +62,14 @@ setup(
py_modules = ['libzt'], py_modules = ['libzt'],
name = 'libzt', name = 'libzt',
packages = ['libzt'], packages = ['libzt'],
version = '1.1.5a19', version = '1.1.6a0',
description = 'ZeroTier, in library form.', description = 'ZeroTier',
long_description = 'Encrypted P2P networks between your applications', long_description = 'Encrypted P2P communication between apps and services',
author = 'ZeroTier, Inc.', author = 'ZeroTier, Inc.',
author_email = 'joseph@zerotier.com', author_email = 'joseph@zerotier.com',
url = 'https://github.com/zerotier/libzt', url = 'https://github.com/zerotier/libzt',
license='GPLv3', license='GPLv3',
download_url = 'https://github.com/zerotier/libzt/archive/1.1.5.tar.gz', download_url = 'https://github.com/zerotier/libzt/archive/1.1.6.tar.gz',
keywords = 'zerotier sdwan sdn virtual network socket p2p peer-to-peer', keywords = 'zerotier sdwan sdn virtual network socket p2p peer-to-peer',
classifiers = ['Development Status :: 3 - Alpha', classifiers = ['Development Status :: 3 - Alpha',
'Environment :: MacOS X', 'Environment :: MacOS X',

Loading…
Cancel
Save