Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ clean:

build: clean
@echo "Building..."
@pip install -U setuptools
@python setup.py sdist bdist_wheel --universal

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

generate-rst:
@pandoc --from=markdown --to=rst --output=README.rst README.md

publish: generate-rst build
publish: build
@echo "Publishing to pypi..."
@$(ENV)/bin/twine upload -r $(REPOSITORY) dist/*

Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ Django webpack loader consumes the output generated by [webpack-bundle-tracker](

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

## Maintainers
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:

pip install -r requirements-dev.txt

before uploading to PyPI.

If pandoc or pypandoc fails, the README.md file will be uploaded as it was before this enhancement.

## Compatibility

Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ def rel(*parts):
'''returns the relative path to a file wrt to the current directory'''
return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts))

if os.path.isfile('README.rst'):
README = open('README.rst', 'r').read()
else:
README = open('README.md', 'r').read()
README = open('README.md', 'r').read()

with open(rel('webpack_loader', '__init__.py')) as handler:
INIT_PY = handler.read()
Expand All @@ -25,6 +22,7 @@ def rel(*parts):
version = VERSION,
description = 'Transparently use webpack with django',
long_description=README,
long_description_content_type="text/markdown",
author = 'Owais Lone',
author_email = 'hello@owaislone.org',
download_url = 'https://github.com/owais/django-webpack-loader/tarball/{0}'.format(VERSION),
Expand Down