packaging workflow
Browse files- Makefile +6 -0
- docs/index.rst +8 -12
- pytube/__init__.py +3 -3
- setup.cfg +1 -1
- setup.py +31 -72
Makefile
CHANGED
@@ -29,3 +29,9 @@ clean-pyc:
|
|
29 |
|
30 |
install: clean
|
31 |
python setup.py install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
install: clean
|
31 |
python setup.py install
|
32 |
+
|
33 |
+
package:
|
34 |
+
pipenv run python setup.py sdist bdist_wheel
|
35 |
+
|
36 |
+
upload:
|
37 |
+
twine upload dist/*
|
docs/index.rst
CHANGED
@@ -1,31 +1,27 @@
|
|
1 |
-
..
|
2 |
sphinx-quickstart on Mon Oct 9 02:11:41 2017.
|
3 |
You can adapt this file completely to your liking, but it should at least
|
4 |
contain the root `toctree` directive.
|
5 |
|
6 |
-
|
7 |
======
|
8 |
Release v\ |version|. (:ref:`Installation <install>`)
|
9 |
|
10 |
-
.. image:: https://img.shields.io/pypi/v/
|
11 |
:alt: Pypi
|
12 |
-
:target: https://pypi.python.org/pypi/
|
13 |
|
14 |
-
.. image:: https://travis-ci.org/
|
15 |
:alt: Build status
|
16 |
-
:target: https://travis-ci.org/
|
17 |
-
|
18 |
-
.. image:: https://readthedocs.org/projects/python-pytube/badge/?version=latest
|
19 |
-
:target: http://python-pytube.readthedocs.io/en/latest/?badge=latest
|
20 |
-
:alt: Documentation Status
|
21 |
|
22 |
.. image:: https://coveralls.io/repos/github/nficano/pytube/badge.svg?branch=master
|
23 |
:alt: Coverage
|
24 |
:target: https://coveralls.io/github/nficano/pytube?branch=master
|
25 |
|
26 |
-
.. image:: https://img.shields.io/pypi/pyversions/
|
27 |
:alt: Python Versions
|
28 |
-
:target: https://pypi.python.org/pypi/
|
29 |
|
30 |
**pytube** is a lightweight, Pythonic, dependency-free, library (and command-line utility) for downloading YouTube Videos.
|
31 |
|
|
|
1 |
+
.. pytube3 documentation master file, created by
|
2 |
sphinx-quickstart on Mon Oct 9 02:11:41 2017.
|
3 |
You can adapt this file completely to your liking, but it should at least
|
4 |
contain the root `toctree` directive.
|
5 |
|
6 |
+
pytube3
|
7 |
======
|
8 |
Release v\ |version|. (:ref:`Installation <install>`)
|
9 |
|
10 |
+
.. image:: https://img.shields.io/pypi/v/pytube3.svg
|
11 |
:alt: Pypi
|
12 |
+
:target: https://pypi.python.org/pypi/pytube3/
|
13 |
|
14 |
+
.. image:: https://travis-ci.org/hbmartin/pytube3.svg?branch=master
|
15 |
:alt: Build status
|
16 |
+
:target: https://travis-ci.org/hbmartin/pytube3
|
|
|
|
|
|
|
|
|
17 |
|
18 |
.. image:: https://coveralls.io/repos/github/nficano/pytube/badge.svg?branch=master
|
19 |
:alt: Coverage
|
20 |
:target: https://coveralls.io/github/nficano/pytube?branch=master
|
21 |
|
22 |
+
.. image:: https://img.shields.io/pypi/pyversions/pytube3.svg
|
23 |
:alt: Python Versions
|
24 |
+
:target: https://pypi.python.org/pypi/pytube3/
|
25 |
|
26 |
**pytube** is a lightweight, Pythonic, dependency-free, library (and command-line utility) for downloading YouTube Videos.
|
27 |
|
pytube/__init__.py
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
"""
|
5 |
Pytube: a very serious Python library for downloading YouTube Videos.
|
6 |
"""
|
7 |
-
__title__ = "
|
8 |
-
__version__ = "9.5.
|
9 |
-
__author__ = "Nick Ficano"
|
10 |
__license__ = "MIT License"
|
11 |
__copyright__ = "Copyright 2019 Nick Ficano"
|
12 |
|
|
|
4 |
"""
|
5 |
Pytube: a very serious Python library for downloading YouTube Videos.
|
6 |
"""
|
7 |
+
__title__ = "pytube3"
|
8 |
+
__version__ = "9.5.5"
|
9 |
+
__author__ = "Nick Ficano, Harold Martin"
|
10 |
__license__ = "MIT License"
|
11 |
__copyright__ = "Copyright 2019 Nick Ficano"
|
12 |
|
setup.cfg
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
[bumpversion]
|
2 |
commit = True
|
3 |
tag = True
|
4 |
-
current_version = 9.5.
|
5 |
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
|
6 |
serialize =
|
7 |
{major}.{minor}.{patch}
|
|
|
1 |
[bumpversion]
|
2 |
commit = True
|
3 |
tag = True
|
4 |
+
current_version = 9.5.5
|
5 |
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
|
6 |
serialize =
|
7 |
{major}.{minor}.{patch}
|
setup.py
CHANGED
@@ -3,87 +3,46 @@
|
|
3 |
"""This module contains setup instructions for pytube."""
|
4 |
import codecs
|
5 |
import os
|
6 |
-
import sys
|
7 |
-
from shutil import rmtree
|
8 |
-
|
9 |
-
from setuptools import Command
|
10 |
from setuptools import setup
|
11 |
|
12 |
here = os.path.abspath(os.path.dirname(__file__))
|
13 |
|
14 |
-
with codecs.open(os.path.join(here,
|
15 |
-
long_description =
|
16 |
-
|
17 |
-
|
18 |
-
class UploadCommand(Command):
|
19 |
-
"""Support setup.py publish."""
|
20 |
-
|
21 |
-
description = 'Build and publish the package.'
|
22 |
-
user_options = []
|
23 |
-
|
24 |
-
@staticmethod
|
25 |
-
def status(s):
|
26 |
-
"""Prints things in bold."""
|
27 |
-
print('\033[1m{0}\033[0m'.format(s))
|
28 |
-
|
29 |
-
def initialize_options(self):
|
30 |
-
pass
|
31 |
-
|
32 |
-
def finalize_options(self):
|
33 |
-
pass
|
34 |
-
|
35 |
-
def run(self):
|
36 |
-
try:
|
37 |
-
self.status('Removing previous builds ...')
|
38 |
-
rmtree(os.path.join(here, 'dist'))
|
39 |
-
except Exception:
|
40 |
-
pass
|
41 |
-
self.status('Building Source distribution ...')
|
42 |
-
os.system('{0} setup.py sdist bdist_wheel'.format(sys.executable))
|
43 |
-
self.status('Uploading the package to PyPI via Twine ...')
|
44 |
-
os.system('twine upload dist/*')
|
45 |
-
sys.exit()
|
46 |
-
|
47 |
|
48 |
setup(
|
49 |
-
name=
|
50 |
-
version=
|
51 |
-
author=
|
52 |
-
author_email=
|
53 |
-
packages=[
|
54 |
-
package_data={
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
license='MIT',
|
59 |
-
entry_points={
|
60 |
-
'console_scripts': [
|
61 |
-
'pytube = pytube.cli:main',
|
62 |
-
],
|
63 |
-
},
|
64 |
classifiers=[
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
],
|
84 |
-
description=(
|
85 |
include_package_data=True,
|
86 |
-
long_description_content_type=
|
87 |
long_description=long_description,
|
88 |
zip_safe=True,
|
89 |
)
|
|
|
3 |
"""This module contains setup instructions for pytube."""
|
4 |
import codecs
|
5 |
import os
|
|
|
|
|
|
|
|
|
6 |
from setuptools import setup
|
7 |
|
8 |
here = os.path.abspath(os.path.dirname(__file__))
|
9 |
|
10 |
+
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
|
11 |
+
long_description = "\n" + fh.read()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
setup(
|
14 |
+
name="pytube3",
|
15 |
+
version="9.5.5",
|
16 |
+
author="Nick Ficano, Harold Martin",
|
17 |
+
author_email="[email protected], [email protected]",
|
18 |
+
packages=["pytube", "pytube.contrib"],
|
19 |
+
package_data={"": ["LICENSE"],},
|
20 |
+
url="https://github.com/hbmartin/pytube3",
|
21 |
+
license="MIT",
|
22 |
+
entry_points={"console_scripts": ["pytube = pytube.cli:main",],},
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
classifiers=[
|
24 |
+
"Development Status :: 5 - Production/Stable",
|
25 |
+
"Environment :: Console",
|
26 |
+
"Intended Audience :: Developers",
|
27 |
+
"License :: OSI Approved :: MIT License",
|
28 |
+
"Natural Language :: English",
|
29 |
+
"Operating System :: MacOS",
|
30 |
+
"Operating System :: Microsoft",
|
31 |
+
"Operating System :: POSIX",
|
32 |
+
"Operating System :: Unix",
|
33 |
+
"Programming Language :: Python :: 3.5",
|
34 |
+
"Programming Language :: Python :: 3.6",
|
35 |
+
"Programming Language :: Python :: 3.7",
|
36 |
+
"Programming Language :: Python",
|
37 |
+
"Topic :: Internet",
|
38 |
+
"Topic :: Multimedia :: Video",
|
39 |
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
40 |
+
"Topic :: Terminals",
|
41 |
+
"Topic :: Utilities",
|
42 |
],
|
43 |
+
description=("Python 3 library for downloading YouTube Videos."),
|
44 |
include_package_data=True,
|
45 |
+
long_description_content_type="text/markdown",
|
46 |
long_description=long_description,
|
47 |
zip_safe=True,
|
48 |
)
|