-#!/usr/bin/env python
-
# Copyright 2011 GRNET S.A. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# documentation are those of the authors and should not be
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
+#
+
+import distribute_setup
+distribute_setup.use_setuptools()
import os
-import sys
-from fnmatch import fnmatchcase
from distutils.util import convert_path
-
+from fnmatch import fnmatchcase
from setuptools import setup, find_packages
-from pithos import get_version
+from synnefo.util import version
+
+HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
+version.update_version('pithos.lib', 'version', HERE)
+from pithos.lib.version import __version__
+
+# Package info
+VERSION = __version__
+README = open(os.path.join(HERE, 'README')).read()
+CHANGES = open(os.path.join(HERE, 'Changelog')).read()
+SHORT_DESCRIPTION = 'Package short description'
+PACKAGES_ROOT = '.'
+PACKAGES = find_packages(PACKAGES_ROOT)
-VERSION = get_version().replace(' ', '')
+# Package meta
+CLASSIFIERS = []
+# Package requirements
INSTALL_REQUIRES = [
- 'Django==1.2.3',
- 'SQLAlchemy==0.6.3',
- 'MySQL-python==1.2.2',
- 'psycopg2==2.2.1'
]
+EXTRAS_REQUIRES = {
+}
+
+TESTS_REQUIRES = [
+]
-def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+# Provided as an attribute, so you can append to these instead
+# of replicating them:
+standard_exclude = ["*.py", "*.pyc", "*$py.class", "*~", ".*", "*.bak"]
+standard_exclude_directories = [
+ ".*", "CVS", "_darcs", "./build", "./dist", "EGG-INFO", "*.egg-info", "snf-0.7"
+]
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Note: you may want to copy this into your setup.py file verbatim, as
# you can't import this from another package, when you don't know if
# that package is installed yet.
-
-# Provided as an attribute, so you can append to these instead
-# of replicating them:
-standard_exclude = ('*.py', '*.pyc', '*$py.class', '*~', '.*', '*.bak')
-standard_exclude_directories = ('.*', 'CVS', '_darcs', './build',
- './dist', 'EGG-INFO', '*.egg-info')
-
def find_package_data(
- where='.', package='',
+ where=".",
+ package="",
exclude=standard_exclude,
exclude_directories=standard_exclude_directories,
only_in_packages=True,
The dictionary looks like::
- {'package': [files]}
+ {"package": [files]}
Where ``files`` is a list of all the files in that package that
- don't match anything in ``exclude``.
+ don"t match anything in ``exclude``.
If ``only_in_packages`` is true, then top-level directories that
- are not packages won't be included (but directories under packages
+ are not packages won"t be included (but directories under packages
will).
Directories matching any pattern in ``exclude_directories`` will
be ignored; by default directories with leading ``.``, ``CVS``,
and ``_darcs`` will be ignored.
- If ``show_ignored`` is true, then all the files that aren't
+ If ``show_ignored`` is true, then all the files that aren"t
included in package data are shown on stderr (for debugging
purposes).
Note patterns use wildcards, or can be exact paths (including
leading ``./``), and all searching is case-insensitive.
"""
-
out = {}
- stack = [(convert_path(where), '', package, only_in_packages)]
+ stack = [(convert_path(where), "", package, only_in_packages)]
while stack:
where, prefix, package, only_in_packages = stack.pop(0)
for name in os.listdir(where):
break
if bad_name:
continue
- if (os.path.isfile(os.path.join(fn, '__init__.py'))
+ if (os.path.isfile(os.path.join(fn, "__init__.py"))
and not prefix):
if not package:
new_package = name
else:
- new_package = package + '.' + name
- stack.append((fn, '', new_package, False))
+ new_package = package + "." + name
+ stack.append((fn, "", new_package, False))
else:
- stack.append((fn, prefix + name + '/', package, only_in_packages))
+ stack.append((fn, prefix + name + "/", package, only_in_packages))
elif package or not only_in_packages:
# is a file
bad_name = False
return out
setup(
- name='Pithos',
- version=VERSION,
- license='BSD',
- url='http://code.grnet.gr/projects/pithos',
- description='Pithos file storage service and tools',
- long_description=read('README'),
- classifiers=[
- 'Development Status :: 3 - Alpha',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Topic :: Utilities',
- 'License :: OSI Approved :: BSD License',
- ],
-
- author='GRNET',
- author_email='pithos@grnet.gr',
-
- packages=find_packages(),
- include_package_data=True,
- package_data=find_package_data('.'),
- zip_safe=False,
-
- #install_requires = INSTALL_REQUIRES,
-
- entry_points={
- 'console_scripts': ['pithos-manage = pithos.manage:main']
- },
- scripts=[
- 'pithos/tools/pithos-sh',
- 'pithos/tools/pithos-sync',
- 'pithos/tools/pithos-fs',
- 'pithos/tools/pithos-test'
- ]
+ name = 'snf-pithos-lib',
+ version = VERSION,
+ license = 'BSD',
+ url = 'http://code.grnet.gr/',
+ description = SHORT_DESCRIPTION,
+ long_description=README + '\n\n' + CHANGES,
+ classifiers = CLASSIFIERS,
+
+ author = 'Package author',
+ author_email = 'author@grnet.gr',
+ maintainer = 'Package maintainer',
+ maintainer_email = 'maintainer@grnet.gr',
+
+ namespace_packages = ['pithos'],
+ packages = PACKAGES,
+ package_dir= {'': PACKAGES_ROOT},
+ include_package_data = True,
+ package_data = find_package_data('.'),
+ zip_safe = False,
+
+ dependency_links = [
+ 'http://docs.dev.grnet.gr/pypi/index.html'],
+
+ install_requires = INSTALL_REQUIRES,
+ extras_require = EXTRAS_REQUIRES,
+ tests_require = TESTS_REQUIRES,
+
+ entry_points = {
+ 'console_scripts': [
+ ],
+ },
)
+