Skip to content

Commit 4ba55d9

Browse files
committed
minor changes in order to fix publishing dist on new PiPy
1 parent e29abde commit 4ba55d9

File tree

9 files changed

+47
-17
lines changed

9 files changed

+47
-17
lines changed

HISTORY.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Changelog
22
---------
33

4-
0.4.3 (02/01/2019)
4+
0.4.3 (03/01/2019)
55
++++++++++++++++++
66

77
* Added support for Python3.7 (``StopIteration --> return``) `Pull Request #18 <https://github.com/markuskiller/textblob-de/pull/18>`_ (thanks @andrewmfiorillo)
88
* Fixed tests for Google translation examples
99
* Updated tox/Travis-CI config files to include latest Python & pypy versions
1010
* Updated sphinx_rtd_theme to version 0.4.2 to fix rendering problems on `RTD <http://textblob-de.readthedocs.org>`_
11+
* Updated ``setup.py publish`` commands, ``Makefile`` & ``Manifest.in`` to new PiPy (using ``twine``)
1112

1213
0.4.2 (02/05/2015)
1314
++++++++++++++++++

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 Markus Killer
1+
Copyright 2014-2019 Markus Killer
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ recursive-include textblob_de/data *.xml
44
recursive-exclude textblob_de/ext __pycache__ *.pyc
55
recursive-include tests *
66
recursive-include docs *
7-
exclude docs/src/_build
7+
prune docs/src/_build
8+
prune docs/src/_themes
9+
prune docs/html/_static/fonts
810
recursive-exclude docs __pycache__ *.pyc
911
recursive-exclude tests __pycache__ *.pyc

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ P = python
1515
# Linux 'open' or 'xdg-open' / OSX: 'open' / Win: 'start'
1616

1717
#O = start
18-
O = xdg-open
19-
#O = open
18+
#O = xdg-open
19+
O = open
2020

2121

2222
help:
@@ -53,6 +53,7 @@ help:
5353
@echo "docs-pdf generate Sphinx HTML and PDF documentation, including API docs"
5454
@echo "sdist package"
5555
@echo "publish package and upload sdist and universal wheel to PyPI"
56+
@echo "publish-test package and upload sdist and universal wheel to PyPI"
5657
@echo "register update README.rst on PyPI"
5758
@echo "push-github push all changes to git repository on github.com"
5859
@echo "push-bitbucket push all changes to git repository on bitbucket.org"
@@ -151,12 +152,17 @@ docs: clean develop
151152

152153

153154
docs-pdf: docs
154-
make -C ./docs/src latexpdf
155+
#make -C ./docs/src latexpdf
155156
#$(O) ./docs/$(subst _,-,$(N)).pdf &
157+
curl https://media.readthedocs.org/pdf/textblob-de/stable/textblob-de.pdf --output docs/textblob-de.pdf
156158

157159
publish: clean docs-pdf
158160
$(P) setup.py publish
159161
$(O) https://pypi.python.org/pypi/$(subst _,-,$(N)) &
162+
163+
publish-test: clean docs-pdf
164+
$(P) setup.py publish_test
165+
$(O) https://test.pypi.org/project/$(subst _,-,$(N)) &
160166

161167
sdist: clean docs-pdf
162168
$(P) setup.py sdist

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,13 @@ TODO
184184
License
185185
-------
186186

187-
[MIT licensed](http://choosealicense.com/licenses/mit/). See the bundled
188-
`LICENSE` file for more details.
187+
MIT licensed. See the bundled
188+
[LICENSE](https://github.com/markuskiller/textblob-de/blob/master/LICENSE)
189+
file for more details.
189190

190191
Thanks
191192
------
192193

193-
Coded with Wing IDE 5.0 (free open source developer license)
194+
Coded with Wing IDE (free open source developer license)
194195

195196
[![Python IDE for Python - wingware.com](https://wingware.com/images/wingware-logo-180x58.png)](https://wingware.com/store/free)

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ TODO
196196
License
197197
-------
198198
199-
`MIT licensed <http://choosealicense.com/licenses/mit/>`_. See the bundled ``LICENSE`` file for more details.
199+
MIT licensed. See the bundled `LICENSE <https://github.com/markuskiller/textblob-de/blob/master/LICENSE>`_ file for more details.
200200
201201
202202
Thanks
203203
------
204204
205-
Coded with Wing IDE 5.0 (free open source developer license)
205+
Coded with Wing IDE (free open source developer license)
206206
207207
.. image:: https://wingware.com/images/wingware-logo-180x58.png
208208
:target: https://wingware.com/store/free

docs/src/docs_makefile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Documentation ``Makefile``
44

55
::
66

7-
generated: 02 January 2019 - 15:56
7+
generated: 03 January 2019 - 00:50
88

99
Please use `make <target>' where <target> is one of
1010

docs/src/project_makefile.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Project ``Makefile``
44

55
::
66

7-
generated: 02 January 2019 - 15:56
7+
generated: 03 January 2019 - 00:50
88

99
1010
Please use 'make <target>' where where <target> is one of
@@ -39,6 +39,7 @@ Project ``Makefile``
3939
docs-pdf generate Sphinx HTML and PDF documentation, including API docs
4040
sdist package
4141
publish package and upload sdist and universal wheel to PyPI
42+
publish-test package and upload sdist and universal wheel to PyPI
4243
register update README.rst on PyPI
4344
push-github push all changes to git repository on github.com
4445
push-bitbucket push all changes to git repository on bitbucket.org

setup.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919

2020
BUILD_CMD = "python setup.py sdist bdist_wheel"
21-
PUBLISH_CMD = "twine check register upload dist/*"
22-
TEST_PUBLISH_CMD = 'python setup.py register -r test sdist bdist_wheel upload -r test'
21+
CHECK_DIST_CMD = "twine check dist/*"
22+
PUBLISH_CMD = "twine upload dist/*"
23+
REGISTER_CMD = "twine register textblob-de"
24+
TEST_PUBLISH_CMD = 'twine upload --repository-url https://test.pypi.org/legacy/ dist/*'
2325
TEST_CMD = 'python run_tests.py'
2426

2527

@@ -55,6 +57,7 @@ def find_version(fname):
5557
print("twine required. Run `pip install twine`.")
5658
sys.exit(1)
5759
build = subprocess.call(BUILD_CMD, shell=True)
60+
check_dist = subprocess.call(CHECK_DIST_CMD, shell=True)
5861
status = subprocess.call(PUBLISH_CMD, shell=True)
5962
sys.exit(status)
6063

@@ -64,8 +67,24 @@ def find_version(fname):
6467
except ImportError:
6568
print("wheel required. Run `pip install wheel`.")
6669
sys.exit(1)
70+
try:
71+
__import__('twine')
72+
except ImportError:
73+
print("twine required. Run `pip install twine`.")
74+
sys.exit(1)
75+
build = subprocess.call(BUILD_CMD, shell=True)
76+
check_dist = subprocess.call(CHECK_DIST_CMD, shell=True)
6777
status = subprocess.call(TEST_PUBLISH_CMD, shell=True)
6878
sys.exit(status)
79+
80+
if 'register' in sys.argv:
81+
try:
82+
__import__('twine')
83+
except ImportError:
84+
print("twine required. Run `pip install twine`.")
85+
sys.exit(1)
86+
status = subprocess.call(REGISTER_CMD, shell=True)
87+
sys.exit(status)
6988

7089
if 'run_tests' in sys.argv:
7190
try:
@@ -87,7 +106,7 @@ def read(fname):
87106
name='textblob-de',
88107
version=__version__,
89108
description='German language support for TextBlob.',
90-
long_description=(
109+
long_description=('\n' +
91110
read("README.rst") + '\n\n' + read("HISTORY.rst")),
92111
author='Markus Killer',
93112
author_email='m.killer@langui.ch',
@@ -105,7 +124,7 @@ def read(fname):
105124
"ext/_pattern/text/de/*.*",
106125
]},
107126
install_requires=requires,
108-
license='\n\n' + read("LICENSE") + '\n\n',
127+
license='MIT',
109128
zip_safe=False,
110129
keywords=[
111130
'textblob',

0 commit comments

Comments
 (0)