python distribute try again

This commit is contained in:
Ciro Santilli
2020-03-18 00:00:00 +00:00
parent 1ce4a4dff4
commit 27496e02b8
6 changed files with 40 additions and 4 deletions

5
.gitignore vendored
View File

@@ -7,3 +7,8 @@
/*.egg-info/
/build/
/dist/
# Tests.
*.tmp
tmp.*
*.tmp.*

View File

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

View File

@@ -4918,9 +4918,15 @@ python -m pip install china-dictatorship
china-dictatorship.py > README.html
....
TODO: create an Ubuntu PPA as well.
We later found on Google by chance that libraries.io picked it up and rendered the README nicely as well: https://libraries.io/pypi/china-dictatorship (https://web.archive.org/web/20200318043050/https://libraries.io/pypi/china-dictatorship[archive]). This is why packaging is a good idea.
Update all mirrors with: link:push-mirrors[]
TODO: create an Ubuntu PPA and Ruby gem as well.
Update all mirrors in one go with: link:push-mirrors[]:
....
./push-mirrors
....
== Backlinks to this repository

View File

@@ -1 +1,8 @@
#!/usr/bin/env python
import pkg_resources
readme_html_path = pkg_resources.resource_string(__name__, 'README.html')
print(readme_html_path)
with open(readme_html_path) as f:
print(f.read())

View File

@@ -4,7 +4,10 @@
set -eux
make
# NPM package.
# Updates package.json version, which other systems read if possible.
./push-mirrors-bump-package-json-version
git add package.json
git commit -m 'bump package.json'

View File

@@ -1,12 +1,24 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
https://github.com/cirosantilli/china-dictatorship#mirrors
'''
import json
from setuptools import setup, find_packages
with open('package.json') as f:
package_json = json.load(f)
version = package_json['version']
setup(
name='china-dictatorship',
version='0.0.1',
version=version,
description='2018新疆改造中心1989六四事件1999法轮功 2019 996.ICU, 2018包子露宪2015 710律师劫2015巴拿马文件 邓家贵2017低端人口2008西藏骚乱',
# Fails with: "The description failed to render in the default format of reStructuredText."
#long_description=readme(),
long_description='2018新疆改造中心1989六四事件1999法轮功 2019 996.ICU, 2018包子露宪2015 710律师劫2015巴拿马文件 邓家贵2017低端人口2008西藏骚乱',
url='https://github.com/cirosantilli/china-dictatorship',
author='Ciro Santilli',
@@ -14,4 +26,8 @@ setup(
packages=find_packages(),
include_package_data=True,
scripts=['china-dictatorship.py'],
data_files=[
'README.adoc',
'README.html',
],
)