-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (53 loc) · 1.83 KB
/
setup.py
File metadata and controls
66 lines (53 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
"""
gstbasetransform is a module that provides a patched GstBase.BaseTransform that
makes the do_transform_size virtual method usable in python.
"""
import os
import re
import sys
from setuptools import setup
def find_version():
"""Read the package's version from gstbasetransform.py"""
version_filename = os.path.abspath("gstbasetransform.py")
with open(version_filename) as fileobj:
version_content = fileobj.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_content, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# 'setup.py publish' shortcut.
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist bdist_wheel')
os.system('twine upload dist/*')
sys.exit()
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
name="gstbasetransform",
version=find_version(),
description="A module that makes GstBase.BaseTransform python-compatible",
long_description=long_description,
license="LGPL",
url="https://github.com/Muges/gstbasetransform",
author="Muges",
author_email="git@muges.fr",
py_modules=["gstbasetransform"],
install_requires=[
"six",
],
classifiers=[
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Multimedia :: Sound/Audio"
]
)