python package sketch

This commit is contained in:
Ciro Santilli
2020-03-17 00:00:09 +00:00
parent 17818fafc3
commit 1ce4a4dff4
7 changed files with 52 additions and 2 deletions

9
.gitignore vendored
View File

@@ -1,2 +1,9 @@
/README
/README.html /README.html
# NPM README
/README
# Python distribution/packaging.
/*.egg-info/
/build/
/dist/

1
MANIFEST.in Normal file
View File

@@ -0,0 +1 @@
include README.adoc

View File

@@ -4909,7 +4909,16 @@ npm i -g china-dictatorship
china-dictatorship > README.html china-dictatorship > README.html
.... ....
This would force China to also block package managers to block this repo. TODO: create Ubuntu PPA and Python PyPi versions as well. This would force China to also block package managers to block this repo.
We managed to upload a Python PyPi package at: https://pypi.org/project/china-dictatorship/ but TODO needs implementing now. Usage will be as:
....
python -m pip install china-dictatorship
china-dictatorship.py > README.html
....
TODO: create an Ubuntu PPA as well.
Update all mirrors with: link:push-mirrors[] Update all mirrors with: link:push-mirrors[]

1
china-dictatorship.py Executable file
View File

@@ -0,0 +1 @@
#!/usr/bin/env python

View File

View File

@@ -1,8 +1,23 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# https://github.com/cirosantilli/china-dictatorship#mirrors
set -eux set -eux
# NPM package.
./push-mirrors-bump-package-json-version ./push-mirrors-bump-package-json-version
git add package.json git add package.json
git commit -m 'bump package.json' git commit -m 'bump package.json'
git push
npm publish npm publish
## Python package.
## Initial one time setup.
##python -m pip install --user setuptools wheel twine
#python setup.py sdist bdist_wheel
## Asks for password every time.
#twine upload dist/*
#rm -rf build dist *.egg-info
git push git@gitlab.com:cirosantilli/china-dictatorship.git git push git@gitlab.com:cirosantilli/china-dictatorship.git
git push git@bitbucket.org:cirosantilli/china-dictatorship.git git push git@bitbucket.org:cirosantilli/china-dictatorship.git

17
setup.py Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='china-dictatorship',
version='0.0.1',
description='2018新疆改造中心1989六四事件1999法轮功 2019 996.ICU, 2018包子露宪2015 710律师劫2015巴拿马文件 邓家贵2017低端人口2008西藏骚乱',
long_description='2018新疆改造中心1989六四事件1999法轮功 2019 996.ICU, 2018包子露宪2015 710律师劫2015巴拿马文件 邓家贵2017低端人口2008西藏骚乱',
url='https://github.com/cirosantilli/china-dictatorship',
author='Ciro Santilli',
author_email='ciro.santilli.contact@gmail.com',
packages=find_packages(),
include_package_data=True,
scripts=['china-dictatorship.py'],
)