diff --git a/.gitignore b/.gitignore index 1ffdb6c..b3a1398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ -/README /README.html + +# NPM README +/README + +# Python distribution/packaging. +/*.egg-info/ +/build/ +/dist/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5710809 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include README.adoc diff --git a/README.adoc b/README.adoc index b9db487..e31f251 100644 --- a/README.adoc +++ b/README.adoc @@ -4909,7 +4909,16 @@ npm i -g china-dictatorship 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[] diff --git a/china-dictatorship.py b/china-dictatorship.py new file mode 100755 index 0000000..4265cc3 --- /dev/null +++ b/china-dictatorship.py @@ -0,0 +1 @@ +#!/usr/bin/env python diff --git a/china_dictatorship/__init__.py b/china_dictatorship/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/push-mirrors b/push-mirrors index 4326682..1f63ad7 100755 --- a/push-mirrors +++ b/push-mirrors @@ -1,8 +1,23 @@ #!/usr/bin/env bash + +# https://github.com/cirosantilli/china-dictatorship#mirrors + set -eux + +# NPM package. ./push-mirrors-bump-package-json-version git add package.json git commit -m 'bump package.json' +git push 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@bitbucket.org:cirosantilli/china-dictatorship.git diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1c29a66 --- /dev/null +++ b/setup.py @@ -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'], +)