Skip to content

Commit

Permalink
Packaging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
glut23 committed Mar 26, 2020
1 parent 9106321 commit 7d84c01
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 43 deletions.
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
language: python
python:
- 3.8
- 3.7
- 3.6
- 3.5
- 3.4

matrix:
include:
- python: 3.4
env: TOX_ENV=py34
- python: 3.5
env: TOX_ENV=py35
- python: 3.6
env: TOX_ENV=py36
install: pip install -U tox-travis

script: tox -e $TOX_ENV

install:
- pip install -r requirements.txt
- pip install tox

notifications:
email: false
script: tox
7 changes: 4 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include LICENSE
include MANIFEST.in
include *.rst
include README.rst

graft tests

global-exclude __pycache__
global-exclude *.py[co]
recursive-exclude tests *
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.rst
31 changes: 17 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
import io
from setuptools import setup
import re
from setuptools import setup, find_packages

from webvtt import __version__
with io.open('README.rst', 'r', encoding='utf-8') as f:
readme = f.read()

with io.open('webvtt/__init__.py', 'rt', encoding='utf-8') as f:
version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)

def readme():
with io.open('README.rst', 'r', encoding='utf-8') as f:
return f.read()

setup(
name='webvtt-py',
version=__version__,
version=version,
description='WebVTT reader, writer and segmenter',
long_description=readme(),
long_description=readme,
author='Alejandro Mendez',
author_email='[email protected]',
url='https://github.com/glut23/webvtt-py',
packages=[
'webvtt',
],
packages=find_packages('.', exclude=['tests']),
include_package_data=True,
install_requires=['docopt'],
install_requires=[
'docopt'
],
entry_points={
'console_scripts': [
'webvtt=webvtt.cli:main'
]
},
license='MIT',
python_requires='>=3.4',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='webvtt captions',
test_suite='tests'
)
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/webvtt_parser.py → tests/test_webvtt_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from .generic import GenericParserTestCase

import webvtt
Expand Down
18 changes: 12 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[tox]
envlist =
py34,
py35
py36
py37
envlist = py34, py35, py36, py37, py38

[travis]
python =
3.8: py38
3.7: py37
3.6: py36
3.5: py35
3.4: py34

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps = pytest
commands =
py.test tests
pytest

0 comments on commit 7d84c01

Please sign in to comment.