Skip to content

Commit

Permalink
Merge pull request #137 from mottosso/master
Browse files Browse the repository at this point in the history
Fixes #136
  • Loading branch information
mottosso committed Dec 30, 2014
2 parents 8606375 + aebb477 commit b3eae80
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 27 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ build: false # Not a C-sharp project, build stuff at the test step instead.

test_script:
# Build the compiled extension and run the project tests
- "%CMD_IN_ENV% python setup.py nosetests"
- "%CMD_IN_ENV% python run_testsuite.py"
73 changes: 47 additions & 26 deletions setup.py
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"]
},
)

0 comments on commit b3eae80

Please sign in to comment.