Merge pull request #679 from graingert/verify-readme-rst-pypi
verify readme for PyPI
This commit is contained in:
commit
4720513672
4
MANIFEST.in
Normal file
4
MANIFEST.in
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
include README.rst
|
||||||
|
|
||||||
|
recursive-exclude * __pycache__
|
||||||
|
recursive-exclude * *.py[co]
|
|
@ -1,5 +1,5 @@
|
||||||
Sanic
|
Sanic
|
||||||
=================================
|
=====
|
||||||
|
|
||||||
|Join the chat at https://gitter.im/sanic-python/Lobby| |Build Status| |PyPI| |PyPI version|
|
|Join the chat at https://gitter.im/sanic-python/Lobby| |Build Status| |PyPI| |PyPI version|
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ TODO
|
||||||
----
|
----
|
||||||
* Streamed file processing
|
* Streamed file processing
|
||||||
* http2
|
* http2
|
||||||
|
|
||||||
Limitations
|
Limitations
|
||||||
-----------
|
-----------
|
||||||
* No wheels for uvloop and httptools on Windows :(
|
* No wheels for uvloop and httptools on Windows :(
|
||||||
|
|
18
setup.py
18
setup.py
|
@ -9,14 +9,27 @@ from distutils.util import strtobool
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
with codecs.open(os.path.join(os.path.abspath(os.path.dirname(
|
|
||||||
__file__)), 'sanic', '__init__.py'), 'r', 'latin1') as fp:
|
def open_local(paths, mode='r', encoding='latin1'):
|
||||||
|
path = os.path.join(
|
||||||
|
os.path.abspath(os.path.dirname(__file__)),
|
||||||
|
*paths
|
||||||
|
)
|
||||||
|
|
||||||
|
return codecs.open(path, mode, encoding)
|
||||||
|
|
||||||
|
|
||||||
|
with open_local(['sanic', '__init__.py']) as fp:
|
||||||
try:
|
try:
|
||||||
version = re.findall(r"^__version__ = '([^']+)'\r?$",
|
version = re.findall(r"^__version__ = '([^']+)'\r?$",
|
||||||
fp.read(), re.M)[0]
|
fp.read(), re.M)[0]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise RuntimeError('Unable to determine version.')
|
raise RuntimeError('Unable to determine version.')
|
||||||
|
|
||||||
|
|
||||||
|
with open_local(['README.rst']) as rm:
|
||||||
|
long_description = rm.read()
|
||||||
|
|
||||||
setup_kwargs = {
|
setup_kwargs = {
|
||||||
'name': 'sanic',
|
'name': 'sanic',
|
||||||
'version': version,
|
'version': version,
|
||||||
|
@ -26,6 +39,7 @@ setup_kwargs = {
|
||||||
'author_email': 'channelcat@gmail.com',
|
'author_email': 'channelcat@gmail.com',
|
||||||
'description': (
|
'description': (
|
||||||
'A microframework based on uvloop, httptools, and learnings of flask'),
|
'A microframework based on uvloop, httptools, and learnings of flask'),
|
||||||
|
'long_description': long_description,
|
||||||
'packages': ['sanic'],
|
'packages': ['sanic'],
|
||||||
'platforms': 'any',
|
'platforms': 'any',
|
||||||
'classifiers': [
|
'classifiers': [
|
||||||
|
|
13
tox.ini
13
tox.ini
|
@ -1,11 +1,11 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35, py36, flake8
|
envlist = py35, py36, flake8, check
|
||||||
|
|
||||||
|
|
||||||
[travis]
|
[travis]
|
||||||
python =
|
python =
|
||||||
3.5: py35, flake8
|
3.5: py35, flake8, check
|
||||||
3.6: py36, flake8
|
3.6: py36, flake8, check
|
||||||
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -24,3 +24,10 @@ deps =
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
flake8 sanic
|
flake8 sanic
|
||||||
|
|
||||||
|
[testenv:check]
|
||||||
|
deps =
|
||||||
|
docutils
|
||||||
|
pygments
|
||||||
|
commands =
|
||||||
|
python setup.py check -r -s
|
||||||
|
|
Loading…
Reference in New Issue
Block a user