-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from mottosso/master
Fixes #136
- Loading branch information
Showing
2 changed files
with
48 additions
and
27 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,55 +1,76 @@ | ||
from setuptools import setup, find_packages | ||
|
||
with open('README.txt') as f: | ||
with open("README.txt") as f: | ||
readme = f.read() | ||
|
||
|
||
import os | ||
import imp | ||
|
||
version_file = os.path.abspath('pyblish/version.py') | ||
version_mod = imp.load_source('version', version_file) | ||
version_file = os.path.abspath("pyblish/version.py") | ||
version_mod = imp.load_source("version", version_file) | ||
version = version_mod.version | ||
|
||
|
||
classifiers = [ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.6', | ||
'Programming Language :: Python :: 2.7', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Utilities' | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.6", | ||
"Programming Language :: Python :: 2.7", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Utilities" | ||
] | ||
|
||
|
||
tests_dir = os.path.abspath('pyblish/tests/plugins') | ||
tests_package_data = list() | ||
for root, dirs, files in os.walk(tests_dir): | ||
relpath = os.path.relpath(root, tests_dir) | ||
# Collect all plug-ins and configuration files used in tests. | ||
# | ||
# This ends up becoming a list of relative paths, starting | ||
# from the pyblish package dir. | ||
# | ||
# E.g. | ||
# ["plugins//*.py", "plugins/custom/*.py", | ||
# "plugins/duplicate/*.py", ... ] | ||
# | ||
plugins_dir = os.path.abspath("pyblish/tests/plugins") | ||
plugins_package_data = list() | ||
for root, dirs, files in os.walk(plugins_dir): | ||
relpath = os.path.relpath(root, plugins_dir) | ||
relpath = relpath.replace("\\", "/") | ||
tests_package_data.append("plugins/" + relpath.strip(".") + "/*.py") | ||
plugins_package_data.append("plugins/" + relpath.strip(".") + "/*.py") | ||
|
||
|
||
config_dir = os.path.abspath("pyblish/tests/config") | ||
config_package_data = list() | ||
for root, dirs, files in os.walk(config_dir): | ||
relpath = os.path.relpath(root, config_dir) | ||
relpath = relpath.replace("\\", "/") | ||
config_package_data.append("config/" + relpath.strip(".") + "/.pyblish") | ||
config_package_data.append("config/" + relpath.strip(".") + "/*.yaml") | ||
|
||
|
||
tests_package_data = plugins_package_data + config_package_data | ||
|
||
|
||
setup( | ||
name='pyblish', | ||
name="pyblish", | ||
version=version, | ||
description='Plug-in driven automation framework for content', | ||
description="Plug-in driven automation framework for content", | ||
long_description=readme, | ||
author='Abstract Factory and Contributors', | ||
author_email='marcus@abstractfactory.com', | ||
url='https://github.com/abstractfactory/pyblish', | ||
license='LGPL', | ||
author="Abstract Factory and Contributors", | ||
author_email="marcus@abstractfactory.com", | ||
url="https://github.com/abstractfactory/pyblish", | ||
license="LGPL", | ||
packages=find_packages(), | ||
zip_safe=False, | ||
classifiers=classifiers, | ||
package_data={ | ||
'pyblish': ['plugins/*.py', '*.yaml'], | ||
'pyblish.tests': tests_package_data | ||
"pyblish": ["plugins/*.py", "*.yaml", "vendor/nose/*.txt"], | ||
"pyblish.tests": tests_package_data, | ||
}, | ||
entry_points={ | ||
'console_scripts': ['pyblish = pyblish.cli:main'] | ||
"console_scripts": ["pyblish = pyblish.cli:main"] | ||
}, | ||
) |