Skip to content

Commit

Permalink
Remove images from pypi description.
Browse files Browse the repository at this point in the history
  • Loading branch information
flopp committed Sep 19, 2020
1 parent 902167c commit 5cb47dd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
setup:
python3 -m venv .env
.env/bin/pip install --upgrade pip
.env/bin/pip install -r requirements.txt
.env/bin/pip install -r requirements-dev.txt
.env/bin/pip install -r requirements-examples.txt
.env/bin/pip install --upgrade --requirement requirements.txt
.env/bin/pip install --upgrade --requirement requirements-dev.txt
.env/bin/pip install --upgrade --requirement requirements-examples.txt

.PHONY: install
install: setup
Expand Down Expand Up @@ -40,10 +40,14 @@ test:

.PHONY: build-package
build-package:
rm -rf dist
PYTHONPATH=. .env/bin/python setup.py sdist
PYTHONPATH=. .env/bin/twine check dist/*

.PHONY: upload-package-test
upload-package-test:
PYTHONPATH=. .env/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: upload-package
upload-package:
PYTHONPATH=. .env/bin/twine --repository py-staticmaps upload dist/*
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ def _read_meta(rel_path: str, identifier: str) -> str:

def _read_descr(rel_path: str) -> str:
abs_path = os.path.join(os.path.dirname(__file__), rel_path)
re_image = re.compile(r"^.*!\[.*\]\(.*\).*$")
lines: typing.List[str] = []
with open(abs_path) as f:
return f.read()
for line in f:
if re_image.match(line):
continue
lines.append(line)
print("".join(lines))
return "".join(lines)


def _read_reqs(rel_path: str) -> typing.List[str]:
Expand Down
2 changes: 1 addition & 1 deletion staticmaps/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

GITHUB_URL = "https://github.com/flopp/py-staticmaps"
LIB_NAME = "py-staticmaps"
VERSION = "0.0.1"
VERSION = "0.0.2"

0 comments on commit 5cb47dd

Please sign in to comment.