This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-libzt/packages/PyPI/README.md

36 lines
671 B
Markdown
Raw Normal View History

2018-01-08 15:28:25 -08:00
libzt PyPI Package
[pypi/libzt](https://pypi.python.org/pypi/libzt)
***
2018-01-08 15:28:25 -08:00
## Getting started
2018-01-08 15:28:25 -08:00
`pip3 install libzt`
```
2018-01-08 15:28:25 -08:00
import libzt
import time
2018-01-08 15:28:25 -08:00
print('joining virtual network...')
libzt.zts_startjoin('whatev_config', 0x123456789ABCDEF1)
print('fd = ' + str(libzt.zts_socket(1,2,3)))
2018-01-08 15:28:25 -08:00
print('looping forever, ping me')
while True:
time.sleep(1)
```
2018-01-08 15:28:25 -08:00
## Building the Package
2018-01-08 15:28:25 -08:00
Package is specified in [setup.py](setup.py). *Note: A new version must be specified in `setup.py` for every new upload of a package*
2018-01-08 15:28:25 -08:00
Get necessary tools
2018-01-08 15:28:25 -08:00
`pip3 install wheel twine`
2018-01-08 15:28:25 -08:00
Build the binary distribution wheel:
2018-01-08 15:28:25 -08:00
`python3 setup.py bdist_wheel`
2018-01-08 15:28:25 -08:00
Upload to PyPI
2018-01-08 15:28:25 -08:00
`twine upload dist/*`