Skip to content

Commit 9d9a97c

Browse files
4383owais
authored andcommitted
Introduce markdown on PyPi (django-webpack#162)
1 parent a40ab87 commit 9d9a97c

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

Diff for: Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@ clean:
1818

1919
build: clean
2020
@echo "Building..."
21+
@pip install -U setuptools
2122
@python setup.py sdist bdist_wheel --universal
2223

2324
install:
2425
@echo "Installing build dependencies"
2526
@[ ! -d $(ENV)/ ] && python3 -m venv $(ENV)/ || :
2627
@$(ENV)/bin/pip install $(requirements)
2728

28-
generate-rst:
29-
@pandoc --from=markdown --to=rst --output=README.rst README.md
30-
31-
publish: generate-rst build
29+
publish: build
3230
@echo "Publishing to pypi..."
3331
@$(ENV)/bin/twine upload -r $(REPOSITORY) dist/*
3432

Diff for: README.md

-8
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ Django webpack loader consumes the output generated by [webpack-bundle-tracker](
1616

1717
A [changelog](CHANGELOG.md) is also available.
1818

19-
## Maintainers
20-
In order to overcome the lack of support for Markdown on PyPi, building this package can use [pandoc](http://pandoc.org/installing.html) along with [pypandoc](https://pypi.python.org/pypi/pypandoc) to convert the README.md into a Restructured Text format compatible with PyPI. This requires installing `pandoc` for your operating system (installation instructions on the pandoc site), and `pypandoc` which will be installed if you:
21-
22-
pip install -r requirements-dev.txt
23-
24-
before uploading to PyPI.
25-
26-
If pandoc or pypandoc fails, the README.md file will be uploaded as it was before this enhancement.
2719

2820
## Compatibility
2921

Diff for: setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ def rel(*parts):
88
'''returns the relative path to a file wrt to the current directory'''
99
return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts))
1010

11-
if os.path.isfile('README.rst'):
12-
README = open('README.rst', 'r').read()
13-
else:
14-
README = open('README.md', 'r').read()
11+
README = open('README.md', 'r').read()
1512

1613
with open(rel('webpack_loader', '__init__.py')) as handler:
1714
INIT_PY = handler.read()
@@ -25,6 +22,7 @@ def rel(*parts):
2522
version = VERSION,
2623
description = 'Transparently use webpack with django',
2724
long_description=README,
25+
long_description_content_type="text/markdown",
2826
author = 'Owais Lone',
2927
author_email = '[email protected]',
3028
download_url = 'https://github.com/owais/django-webpack-loader/tarball/{0}'.format(VERSION),

0 commit comments

Comments
 (0)