Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Drop d2to1.

  • Loading branch information...
commit 7770a69ced381b59b16b20b447886f7d3f241896 1 parent 5898acb
@jezdez authored
Showing with 53 additions and 47 deletions.
  1. +8 −3 docs/conf.py
  2. +0 −42 setup.cfg
  3. +45 −2 setup.py
View
11 docs/conf.py
@@ -48,9 +48,14 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-version = '0.4'
-# The full version, including alpha/beta/rc tags.
-release = version
+try:
+ from configurations import __version__
+ # The short X.Y version.
+ version = '.'.join(__version__.split('.')[:2])
+ # The full version, including alpha/beta/rc tags.
+ release = __version__
+except ImportError:
+ version = release = 'dev'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
42 setup.cfg
@@ -1,44 +1,2 @@
-[metadata]
-name = django-configurations
-version = 0.4
-author = Jannis Leidel
-author-email = jannis@leidel.info
-summary = A helper for organizing Django settings.
-description-file = README.rst
-license = BSD
-home-page = http://django-configurations.readthedocs.org/
-project-url =
- Github, https://github.com/jezdez/django-configurations/
-classifier =
- Development Status :: 4 - Beta
- Environment :: Web Environment
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Programming Language :: Python :: 2.6
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3.2
- Programming Language :: Python :: 3.3
- Topic :: Utilities
-
-[files]
-packages =
- configurations
- configurations.tests
- configurations.tests.settings
-extra_files =
- README.rst
- CHANGES.rst
- AUTHORS
- .travis.yml
- manage.py
- tasks.py
- requirements/tests.txt
-
-[backwards_compat]
-zip_safe = false
-
[wheel]
universal = 1
View
47 setup.py
@@ -1,4 +1,47 @@
-#!/usr/bin/env python
+from __future__ import print_function
+import os
+import re
+import codecs
from setuptools import setup
-setup(setup_requires=['d2to1'], d2to1=True)
+
+def read(*parts):
+ filename = os.path.join(os.path.dirname(__file__), *parts)
+ with codecs.open(filename, encoding='utf-8') as fp:
+ return fp.read()
+
+
+def find_version(*file_paths):
+ version_file = read(*file_paths)
+ version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
+ version_file, re.M)
+ if version_match:
+ return version_match.group(1)
+ raise RuntimeError("Unable to find version string.")
+
+
+setup(
+ name="django-configurations",
+ version=find_version("configurations", "__init__.py"),
+ url='http://django-configurations.readthedocs.org/',
+ license='BSD',
+ description="A helper for organizing Django settings.",
+ long_description=read('README.rst'),
+ author='Jannis Leidel',
+ author_email='jannis@leidel.info',
+ packages=['configurations'],
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.3',
+ 'Topic :: Utilities',
+ ],
+ zip_safe=False,
+)
Please sign in to comment.
Something went wrong with that request. Please try again.