mirror of
https://github.com/cirosantilli/china-dictatorship.git
synced 2025-09-01 02:31:53 +02:00
OK, Python package really working, omg
This commit is contained in:
7
MANIFEST.in
Normal file
7
MANIFEST.in
Normal file
@@ -0,0 +1,7 @@
|
||||
# Or else pip install cannot find README.adoc on the setup.py
|
||||
include README.adoc
|
||||
include README.html
|
||||
|
||||
# These actually add the file.
|
||||
include china_dictatorship/README.adoc
|
||||
include china_dictatorship/README.html
|
@@ -1,7 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import pkg_resources
|
||||
try:
|
||||
import importlib.resources as importlib_resources
|
||||
except ImportError:
|
||||
# In PY<3.7 fall-back to backported `importlib_resources`.
|
||||
import importlib_resources
|
||||
|
||||
readme_html_path = pkg_resources.resource_filename('china_dictatorship', 'README.html')
|
||||
with open(readme_html_path) as f:
|
||||
print(f.read())
|
||||
with importlib_resources.path('china_dictatorship', 'README.html') as readme_html_path:
|
||||
with open(readme_html_path) as f:
|
||||
print(f.read())
|
||||
|
@@ -21,5 +21,5 @@
|
||||
"scripts": {
|
||||
"prepublishOnly": "cp README.adoc README;make"
|
||||
},
|
||||
"version": "0.0.34"
|
||||
"version": "0.0.50"
|
||||
}
|
||||
|
4
setup.py
4
setup.py
@@ -16,17 +16,15 @@ with open(path.join(this_directory, 'README.adoc')) as f:
|
||||
|
||||
setup(
|
||||
name='china-dictatorship',
|
||||
version='0.0.34',
|
||||
version='0.0.50',
|
||||
description='2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱',
|
||||
long_description=long_description,
|
||||
# Otherwise upload fails with: "The description failed to render in the default format of reStructuredText."
|
||||
long_description_content_type='text/plain',
|
||||
# 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'],
|
||||
package_data={'china_dictatorship': ['README.adoc', 'README.html']},
|
||||
)
|
||||
|
Reference in New Issue
Block a user