Skip to content

Commit f70e7dc

Browse files
committed
Fix package upload process
- Fix incompatibity issues with recent `pypandoc` versions - Fix issues with Twine - Fix references to testpypi
1 parent 214e434 commit f70e7dc

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/coverage.lcov
99
/htmlcov
1010
*.pyc
11+
/.eggs

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ help:
2323
@echo " make clean cleanup temporary files"
2424
@echo " make install-develop install project in develop mode (virtual environment)"
2525
@echo " make develop-deps-ubuntu install software dependencies (valid only in Ubuntu)"
26+
@echo " make develop-deps-macos install software dependencies (valid only in MacOS if using Homebrew)"
2627
@echo " make prepare prepare stuff (build, dist, etc) before publishing"
2728
@echo " make publish-test test publishing a version (PyPI Test)"
2829
@echo " make install-pypitest test install project (from PyPI Test)"
@@ -80,6 +81,9 @@ install:
8081
develop-deps-ubuntu:
8182
apt-get install -y pandoc
8283

84+
develop-deps-macos:
85+
brew install pandoc
86+
8387
install-develop:
8488
virtualenv $(VENV)
8589
. $(VENV)/bin/activate && pip install -r requirements-dev.txt
@@ -88,7 +92,7 @@ install-develop:
8892
install-pypitest:
8993
virtualenv $(VENV)
9094
. $(VENV)/bin/activate && pip install \
91-
--index-url=https://testpypi.python.org/pypi/ $(NAME)==$(VERSION)
95+
--index-url https://test.pypi.org/simple/ $(NAME)==$(VERSION)
9296

9397

9498
# Publish (release)
@@ -100,7 +104,7 @@ prepare:
100104

101105
# To use this command, you should have pypitest configured in your ~/.pypirc.
102106
publish-pypitest: prepare
103-
twine upload dist/* -r pypitest
107+
twine upload --repository testpypi dist/*
104108

105109
publish-pypi: prepare
106110
twine upload dist/*

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-r requirements-test.txt
22

33
setuptools>=0.8
4-
pypandoc>=0.9
4+
pypandoc>=1.9
5+
twine>=4.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def run(self):
8282
with open(tmp_readme_md, "w") as f:
8383
f.write(new_md)
8484
# Now, convert to RST
85-
rst = pypandoc.convert(tmp_readme_md, "rst")
85+
rst = pypandoc.convert_file(tmp_readme_md, "rst")
8686
with open(readme_rst, "w") as f:
8787
f.write(rst)
8888
finally:

0 commit comments

Comments
 (0)