1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/python
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-
"""
The setup.py script needed to build a .egg for an easier distribution
and installation of yapsy.
Requires 'Easy Install' to be installed :)
see there: http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions
Then to create a package run:
$ python setup.py bdist_egg
To use the generated .egg file then:
easy_install Yapsy-{yapsy version}-py{python version}.egg
Automagical stuff:
- test everything::
python setup.py test
- build the packages (sources an egg) and upload all the stuff to pypi::
python setup.py sdist bdist_egg upload
- build the documentation
python setup.py build_sphinx
"""
import os
from setuptools import setup
# just in case setup.py is launched from elsewhere that the containing directory
originalDir = os.getcwd()
os.chdir(os.path.dirname(os.path.abspath(__file__)))
try:
setup(
name = "Yapsy",
version = __import__("yapsy").__version__,
packages = ['yapsy'],
package_dir = {'yapsy':'yapsy'},
# the unit tests
test_suite = "test.test_All.MainTestSuite",
# metadata for upload to PyPI
author = "Thibauld Nion",
author_email = "thibauld@tibonihoo.net",
description = "Yet another plugin system",
license = "BSD",
keywords = "plugin manager",
url = "http://yapsy.sourceforge.net",
# more details
long_description = open("README.txt").read(),
classifiers=['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules'],
platforms='All',
)
finally:
os.chdir(originalDir)
|