Skip to content

Commit 73124de

Browse files
author
Saurabh Kumar
committed
chore(pypi): switch to markdown and twine for pypi upload + update supported version
1 parent 915f794 commit 73124de

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ clean: clean-build clean-pyc
55
clean-build:
66
rm -fr build/
77
rm -fr dist/
8-
rm -fr *.egg-info
8+
rm -fr src/*.egg-info
99

1010
clean-pyc:
1111
find . -name '*.pyc' -exec rm -f {} +
1212
find . -name '*.pyo' -exec rm -f {} +
1313
find . -name '*~' -exec rm -f {} +
1414

15-
release: clean
16-
python setup.py sdist upload
17-
python setup.py bdist_wheel upload
15+
release: sdist
16+
twine check dist/*
17+
twine upload dist/*
18+
19+
release-test: sdist
20+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
1821

1922
sdist: clean
20-
python setup.py sdist
23+
python setup.py sdist bdist_wheel
2124
ls -l dist
2225

2326
test:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ typing; python_version<"3.5"
33
click
44
flake8>=2.2.3
55
ipython
6-
pypandoc
76
pytest-cov
87
pytest>=3.9
98
sh>=1.09
109
tox
1110
wheel
11+
twine

setup.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
# -*- coding: utf-8 -*-
22
from setuptools import setup
33

4-
# https://github.com/theskumar/python-dotenv/issues/45#issuecomment-277135416
5-
try:
6-
import pypandoc
7-
long_description = pypandoc.convert('README.md', 'rst')
8-
long_description = long_description.replace("\r", "") # YOU NEED THIS LINE
9-
except (OSError, ImportError):
10-
print("Pandoc not found. Long_description conversion failure.")
11-
import io
12-
# pandoc is not installed, fallback to using raw contents
13-
with io.open('README.md', encoding="utf-8") as f:
14-
long_description = f.read()
4+
with open('README.md') as f:
5+
long_description = f.read()
156

167
meta = {}
178
with open('./src/dotenv/version.py') as f:
@@ -21,6 +12,7 @@
2112
name="python-dotenv",
2213
description="Add .env support to your django/flask apps in development and deployments",
2314
long_description=long_description,
15+
long_description_content_type='text/markdown',
2416
version=meta['__version__'],
2517
author="Saurabh Kumar",
2618
author_email="me+github@saurabh-kumar.com",
@@ -52,20 +44,21 @@
5244
# 'Development Status :: 6 - Mature',
5345
# 'Development Status :: 7 - Inactive',
5446
'Programming Language :: Python',
55-
'Programming Language :: Python :: 2',
47+
# 'Programming Language :: Python :: 2',
5648
# 'Programming Language :: Python :: 2.3',
5749
# 'Programming Language :: Python :: 2.4',
5850
# 'Programming Language :: Python :: 2.5',
5951
# 'Programming Language :: Python :: 2.6',
6052
'Programming Language :: Python :: 2.7',
61-
'Programming Language :: Python :: 3',
62-
'Programming Language :: Python :: 3.0',
63-
'Programming Language :: Python :: 3.1',
64-
'Programming Language :: Python :: 3.2',
65-
'Programming Language :: Python :: 3.3',
53+
# 'Programming Language :: Python :: 3',
54+
# 'Programming Language :: Python :: 3.0',
55+
# 'Programming Language :: Python :: 3.1',
56+
# 'Programming Language :: Python :: 3.2',
57+
# 'Programming Language :: Python :: 3.3',
6658
'Programming Language :: Python :: 3.4',
6759
'Programming Language :: Python :: 3.5',
6860
'Programming Language :: Python :: 3.6',
61+
'Programming Language :: Python :: 3.7',
6962
'Programming Language :: Python :: Implementation :: PyPy',
7063
'Intended Audience :: Developers',
7164
'Intended Audience :: System Administrators',

0 commit comments

Comments
 (0)