mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
Read version from file instead of import in setup.py (#1155)
This commit is contained in:
parent
405d21b6bc
commit
7ae5ec7da0
1 changed files with 7 additions and 3 deletions
10
setup.py
10
setup.py
|
@ -9,10 +9,14 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
from plexapi import const
|
# Get version
|
||||||
|
version = {}
|
||||||
|
with open('plexapi/const.py') as handle:
|
||||||
|
exec(handle.read(), version)
|
||||||
|
|
||||||
# Get README.rst contents
|
# Get README.rst contents
|
||||||
readme = open('README.rst', 'r').read()
|
with open('README.rst') as handle:
|
||||||
|
readme = handle.read()
|
||||||
|
|
||||||
# Get requirements
|
# Get requirements
|
||||||
with open('requirements.txt') as handle:
|
with open('requirements.txt') as handle:
|
||||||
|
@ -20,7 +24,7 @@ with open('requirements.txt') as handle:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='PlexAPI',
|
name='PlexAPI',
|
||||||
version=const.__version__,
|
version=version['__version__'],
|
||||||
description='Python bindings for the Plex API.',
|
description='Python bindings for the Plex API.',
|
||||||
author='Michael Shepanski',
|
author='Michael Shepanski',
|
||||||
author_email='michael.shepanski@gmail.com',
|
author_email='michael.shepanski@gmail.com',
|
||||||
|
|
Loading…
Reference in a new issue