Switch to using distribute instead of setuptools due to projects merging.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-28 14:14:52 +00:00
parent 494592a6ac
commit 0dc545e51f
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 83 additions and 34 deletions

View File

@ -25,8 +25,18 @@
# both Python>=2.4 and Python3.x. # both Python>=2.4 and Python3.x.
# #
from distutils.core import setup from __future__ import absolute_import
from __future__ import print_function
import inspect
import os
## Upgrade setuptools to a version which supports Python 2 and 3
#os.system('python ./distribute_setup.py')
## Upgrade pip to a version with proper SSL support
#os.system('python ./get-pip.py')
import setuptools
import versioneer import versioneer
versioneer.versionfile_source = 'src/_version.py' versioneer.versionfile_source = 'src/_version.py'
versioneer.versionfile_build = 'gnupg/_version.py' versioneer.versionfile_build = 'gnupg/_version.py'
@ -35,25 +45,64 @@ versioneer.parentdir_prefix = 'python-gnupg-'
__author__ = "Isis Agora Lovecruft" __author__ = "Isis Agora Lovecruft"
__contact__ = 'isis@leap.se' __contact__ = 'isis@leap.se'
__url__ = 'https://github.com/isislovecruft/python-gnupg \
https://python-gnupg.readthedocs.org'
setup(name = "python-gnupg", def get_current_dir():
description="A wrapper for the Gnu Privacy Guard (GPG or GnuPG)", """Current dir of this file, regardless of where we're called from."""
here = inspect.getabsfile(inspect.currentframe()).rsplit(os.path.sep, 1)[0]
return here
def get_deps_reqs():
"""Get dependencies from the pip requirements.txt file."""
requirements_file = os.path.join(get_current_dir(), 'requirements.txt')
dependency_links = []
install_requires = []
with open(requirements_file) as pipfile:
for line in pipfile.readlines():
line = line.strip()
if not line.startswith('#'):
if line.startswith('https'):
dependency_links.append(line)
continue
else:
install_requires.append(line)
return dependency_links, install_requires
deps, reqs = get_deps_reqs()
print('%s' % deps)
print('%s' % reqs)
def run_distribute_setup_script():
"""Run the setuptools/distribute setup script."""
script = os.path.join(get_current_dir(), 'distribute_setup.py')
os.system(script)
setuptools.setup(
name = "python-gnupg",
description="A Python wrapper for GnuPG",
long_description = "This module allows easy access to GnuPG's key \ long_description = "This module allows easy access to GnuPG's key \
management, encryption and signature functionality from Python programs. \ management, encryption and signature functionality from Python programs. \
It is intended for use with Python 2.6 or greater.", It is intended for use with Python 2.6 or greater.",
license="""Copyright © 2013 Isis Lovecruft, et.al. see LICENSE file.""", license="""Copyright © 2013 Isis Lovecruft, et.al. see LICENSE file.""",
version=versioneer.get_version(), version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(), cmdclass=versioneer.get_cmdclass(),
author=__author__, author=__author__,
author_email=__contact__, author_email=__contact__,
maintainer=__author__, maintainer=__author__,
maintainer_email=__contact__, maintainer_email=__contact__,
url="https://github.com/isislovecruft/python-gnupg", url=__url__,
package_dir={'gnupg': 'src'},
packages=['gnupg'], packages=setuptools.find_packages(),
include_package_data=True,
install_requires=reqs,
dependency_links=deps,
extras_require={'docs': ["Sphinx>=1.1"]},
platforms="Linux, BSD, OSX, Windows", platforms="Linux, BSD, OSX, Windows",
download_url="https://github.com/isislovecruft/python-gnupg/archive/develop.zip", download_url="https://github.com/isislovecruft/python-gnupg/archive/master.zip",
classifiers=[ classifiers=[
'Development Status :: 4 - Alpha', 'Development Status :: 4 - Alpha',
"Intended Audience :: Developers", "Intended Audience :: Developers",