-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a _metadata.py file to re-use version number and author
This makes it so the version number only needs to be bumped in one location (and it's named clearly) instead of 3. Can be modified in the future if we want to add more fields, like a date. There's also the possibility to auto-update that file with git tags but might be a bit overkill for now.
- Loading branch information
1 parent
b6bac1d
commit 605eb66
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
from setuptools import setup, find_packages | ||
from setuptools.command.test import test | ||
from distutils.util import convert_path | ||
|
||
# We can't import the submodule normally as that would "run" the main module | ||
# code while the setup script is meant to *build* the module. | ||
|
||
# Besides preventing a whole possible mess of issues with an un-built package, | ||
# this also prevents the vapoursynth import which breaks the docs on RTD. | ||
|
||
# convert_path is used here because according to the distutils docs: | ||
# '...filenames in the setup script are always supplied in Unix | ||
# style, and have to be converted to the local convention before we can | ||
# actually use them in the filesystem.' | ||
meta = {} | ||
exec(open(convert_path('vsutil/_metadata.py')).read(), meta) | ||
|
||
|
||
class DiscoverTest(test): | ||
|
@@ -20,15 +34,15 @@ def run_tests(self): | |
|
||
setup( | ||
name='vsutil', | ||
version='0.5.0', | ||
version=meta['__version__'], | ||
packages=find_packages(exclude=['tests']), | ||
package_data={ | ||
'vsutil': ['py.typed'] | ||
}, | ||
url='https://encode.moe/vsutil', | ||
license='MIT', | ||
author='kageru', | ||
author_email='[email protected]', | ||
author=meta['__author__'].split()[0], | ||
author_email=meta['__author__'].split()[1][1:-1], | ||
description='A collection of general-purpose Vapoursynth functions to be reused in modules and scripts.', | ||
install_requires=[ | ||
"vapoursynth" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__author__ = 'kageru <[email protected]>' | ||
__version__ = '0.5.0' |