diff options
author | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2013-12-23 20:31:42 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2013-12-23 20:48:57 +0100 |
commit | 5550834eae424ac5cfa223b75bdb281fa8b9478f (patch) | |
tree | c0a23fc6a6fa416d2a6b31dc4ac54c73f22e50d5 | |
parent | 9a9aca22fee237a9f0eba4b2c293279b9ed09f46 (diff) | |
download | semantic-version-5550834eae424ac5cfa223b75bdb281fa8b9478f.tar.gz |
Normalize docs to docs/ (Closes #5).
Also normalize the package layout.
Thanks @jdowner-gb & tleach for the report.
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r--[l---------] | ChangeLog | 98 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | doc/changelog.rst | 97 | ||||
-rw-r--r-- | docs/Makefile (renamed from doc/Makefile) | 0 | ||||
-rw-r--r-- | docs/_static/.keep_dir (renamed from doc/_static/.keep_dir) | 0 | ||||
l--------- | docs/changelog.rst | 1 | ||||
-rw-r--r-- | docs/conf.py (renamed from doc/conf.py) | 2 | ||||
-rw-r--r-- | docs/django.rst (renamed from doc/django.rst) | 0 | ||||
l--------- | docs/index.rst (renamed from doc/index.rst) | 0 | ||||
-rw-r--r-- | docs/make.bat (renamed from doc/make.bat) | 0 | ||||
-rw-r--r-- | docs/reference.rst (renamed from doc/reference.rst) | 0 | ||||
-rw-r--r-- | semantic_version/__init__.py (renamed from src/semantic_version/__init__.py) | 0 | ||||
-rw-r--r-- | semantic_version/base.py (renamed from src/semantic_version/base.py) | 0 | ||||
-rw-r--r-- | semantic_version/compat.py (renamed from src/semantic_version/compat.py) | 0 | ||||
-rw-r--r-- | semantic_version/django_fields.py (renamed from src/semantic_version/django_fields.py) | 0 | ||||
-rwxr-xr-x | setup.py | 88 |
17 files changed, 133 insertions, 169 deletions
@@ -1,8 +1,14 @@ -*.pyc +# Temporary files .*.swp +*.pyc +*.pyo + +# Build-related files +docs/_build/ .coverage -htmlcov/ -tests/db/ +*.egg-info +*.egg +build/ dist/ -doc/_build/ +htmlcov/ MANIFEST diff --git a/ChangeLog b/ChangeLog index 36ab6c5..481d6a7 120000..100644 --- a/ChangeLog +++ b/ChangeLog @@ -1 +1,97 @@ -doc/changelog.rst
\ No newline at end of file +ChangeLog +========= + + +2.2.1 (2013-10-29) +------------------ + +*Bugfix:* + + * `#2 <https://github.com/rbarrois/python-semanticversion/issues/2>`_: Properly expose + :func:`~semantic_version.validate` as a top-level module function. + +2.2.0 (2013-03-22) +------------------ + +*Bugfix:* + + * `#1 <https://github.com/rbarrois/python-semanticversion/issues/1>`_: Allow partial + versions without minor or patch level + +*New:* + + * Add the :meth:`Version.coerce <semantic_version.Version.coerce>` class method to + :class:`~semantic_version.Version` class for mapping arbitrary version strings to + semver. + * Add the :func:`~semantic_version.validate` method to validate a version + string against the SemVer rules. + * Full Python3 support + +2.1.2 (2012-05-22) +------------------ + +*Bugfix:* + + * Properly validate :class:`~semantic_version.django_fields.VersionField` and + :class:`~semantic_version.django_fields.SpecField`. + +2.1.1 (2012-05-22) +------------------ + +*New:* + + * Add introspection rules for south + +2.1.0 (2012-05-22) +------------------ + +*New:* + + * Add :func:`semantic_version.Spec.filter` (filter a list of :class:`~semantic_version.Version`) + * Add :func:`semantic_version.Spec.select` (select the highest + :class:`~semantic_version.Version` from a list) + * Update :func:`semantic_version.Version.__repr__` + +2.0.0 (2012-05-22) +------------------ + +*Backwards incompatible changes:* + + * Removed "loose" specification support + * Cleanup :class:`~semantic_version.Spec` to be more intuitive. + * Merge Spec and SpecList into :class:`~semantic_version.Spec`. + * Remove :class:`~semantic_version.django_fields.SpecListField` + +1.2.0 (2012-05-18) +------------------ + +*New:* + + * Allow split specifications when instantiating a + :class:`~semantic_version.SpecList`:: + + >>> SpecList('>=0.1.1', '!=0.1.3') == SpecList('>=0.1.1,!=0.1.3') + True + +1.1.0 (2012-05-18) +------------------ + +*New:* + + * Improved "loose" specification support (``>~``, ``<~``, ``!~``) + * Introduced "not equal" specifications (``!=``, ``!~``) + * :class:`~semantic_version.SpecList` class combining many :class:`~semantic_version.Spec` + * Add :class:`~semantic_version.django_fields.SpecListField` to store a :class:`~semantic_version.SpecList`. + +1.0.0 (2012-05-17) +------------------ + +First public release. + +*New:* + + * :class:`~semantic_version.Version` and :class:`~semantic_version.Spec` classes + * Related django fields: :class:`~semantic_version.django_fields.VersionField` + and :class:`~semantic_version.django_fields.SpecField` + +.. vim:et:ts=4:sw=4:tw=79:ft=rst: @@ -21,7 +21,7 @@ coverage: coverage html "--include=$(PACKAGE_DIR)/*.py,tests/*.py" doc: - $(MAKE) -C doc html + $(MAKE) -C docs html .PHONY: all default clean coverage doc test diff --git a/doc/changelog.rst b/doc/changelog.rst deleted file mode 100644 index 481d6a7..0000000 --- a/doc/changelog.rst +++ /dev/null @@ -1,97 +0,0 @@ -ChangeLog -========= - - -2.2.1 (2013-10-29) ------------------- - -*Bugfix:* - - * `#2 <https://github.com/rbarrois/python-semanticversion/issues/2>`_: Properly expose - :func:`~semantic_version.validate` as a top-level module function. - -2.2.0 (2013-03-22) ------------------- - -*Bugfix:* - - * `#1 <https://github.com/rbarrois/python-semanticversion/issues/1>`_: Allow partial - versions without minor or patch level - -*New:* - - * Add the :meth:`Version.coerce <semantic_version.Version.coerce>` class method to - :class:`~semantic_version.Version` class for mapping arbitrary version strings to - semver. - * Add the :func:`~semantic_version.validate` method to validate a version - string against the SemVer rules. - * Full Python3 support - -2.1.2 (2012-05-22) ------------------- - -*Bugfix:* - - * Properly validate :class:`~semantic_version.django_fields.VersionField` and - :class:`~semantic_version.django_fields.SpecField`. - -2.1.1 (2012-05-22) ------------------- - -*New:* - - * Add introspection rules for south - -2.1.0 (2012-05-22) ------------------- - -*New:* - - * Add :func:`semantic_version.Spec.filter` (filter a list of :class:`~semantic_version.Version`) - * Add :func:`semantic_version.Spec.select` (select the highest - :class:`~semantic_version.Version` from a list) - * Update :func:`semantic_version.Version.__repr__` - -2.0.0 (2012-05-22) ------------------- - -*Backwards incompatible changes:* - - * Removed "loose" specification support - * Cleanup :class:`~semantic_version.Spec` to be more intuitive. - * Merge Spec and SpecList into :class:`~semantic_version.Spec`. - * Remove :class:`~semantic_version.django_fields.SpecListField` - -1.2.0 (2012-05-18) ------------------- - -*New:* - - * Allow split specifications when instantiating a - :class:`~semantic_version.SpecList`:: - - >>> SpecList('>=0.1.1', '!=0.1.3') == SpecList('>=0.1.1,!=0.1.3') - True - -1.1.0 (2012-05-18) ------------------- - -*New:* - - * Improved "loose" specification support (``>~``, ``<~``, ``!~``) - * Introduced "not equal" specifications (``!=``, ``!~``) - * :class:`~semantic_version.SpecList` class combining many :class:`~semantic_version.Spec` - * Add :class:`~semantic_version.django_fields.SpecListField` to store a :class:`~semantic_version.SpecList`. - -1.0.0 (2012-05-17) ------------------- - -First public release. - -*New:* - - * :class:`~semantic_version.Version` and :class:`~semantic_version.Spec` classes - * Related django fields: :class:`~semantic_version.django_fields.VersionField` - and :class:`~semantic_version.django_fields.SpecField` - -.. vim:et:ts=4:sw=4:tw=79:ft=rst: diff --git a/doc/Makefile b/docs/Makefile index 57270ef..57270ef 100644 --- a/doc/Makefile +++ b/docs/Makefile diff --git a/doc/_static/.keep_dir b/docs/_static/.keep_dir index e69de29..e69de29 100644 --- a/doc/_static/.keep_dir +++ b/docs/_static/.keep_dir diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 120000 index 0000000..22ec9b8 --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1 @@ +../ChangeLog
\ No newline at end of file diff --git a/doc/conf.py b/docs/conf.py index 611f3c0..b8272ea 100644 --- a/doc/conf.py +++ b/docs/conf.py @@ -51,7 +51,7 @@ root_dir = os.path.abspath(os.path.dirname(__file__)) def get_version(): import re version_re = re.compile(r"^__version__ = '([\w_.-]+)'$") - with open(os.path.join(root_dir, os.pardir, 'src', 'semantic_version', '__init__.py')) as f: + with open(os.path.join(root_dir, os.pardir, 'semantic_version', '__init__.py')) as f: for line in f: match = version_re.match(line[:-1]) if match: diff --git a/doc/django.rst b/docs/django.rst index a43c3ed..a43c3ed 100644 --- a/doc/django.rst +++ b/docs/django.rst diff --git a/doc/index.rst b/docs/index.rst index 89a0106..89a0106 120000 --- a/doc/index.rst +++ b/docs/index.rst diff --git a/doc/make.bat b/docs/make.bat index 5327a34..5327a34 100644 --- a/doc/make.bat +++ b/docs/make.bat diff --git a/doc/reference.rst b/docs/reference.rst index 5b8ca3e..5b8ca3e 100644 --- a/doc/reference.rst +++ b/docs/reference.rst diff --git a/src/semantic_version/__init__.py b/semantic_version/__init__.py index 6ced92a..6ced92a 100644 --- a/src/semantic_version/__init__.py +++ b/semantic_version/__init__.py diff --git a/src/semantic_version/base.py b/semantic_version/base.py index f5153b2..f5153b2 100644 --- a/src/semantic_version/base.py +++ b/semantic_version/base.py diff --git a/src/semantic_version/compat.py b/semantic_version/compat.py index 51102fc..51102fc 100644 --- a/src/semantic_version/compat.py +++ b/semantic_version/compat.py diff --git a/src/semantic_version/django_fields.py b/semantic_version/django_fields.py index 6a70129..6a70129 100644 --- a/src/semantic_version/django_fields.py +++ b/semantic_version/django_fields.py @@ -2,90 +2,49 @@ # -*- coding: utf-8 -*- # Copyright (c) 2012-2013 Raphaël Barrois -from distutils.core import setup -from distutils import cmd import os import re import sys +from setuptools import setup + root_dir = os.path.abspath(os.path.dirname(__file__)) -def get_version(): - version_re = re.compile(r"^__version__ = '([\w_.-]+)'$") - with open(os.path.join(root_dir, 'src', 'semantic_version', '__init__.py')) as f: +def get_version(package_name): + version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$") + package_components = package_name.split('.') + path_components = package_components + ['__init__.py'] + with open(os.path.join(root_dir, *path_components)) as f: for line in f: match = version_re.match(line[:-1]) if match: return match.groups()[0] - return '0.0.0' - - -class test(cmd.Command): - """Run the tests for this package.""" - command_name = 'test' - description = 'run the tests associated with the package' - - user_options = [ - ('test-suite=', None, "A test suite to run (defaults to 'tests')"), - ] - - DEFAULT_TEST_SUITE = 'tests' - - def initialize_options(self): - self.test_runner = None - self.test_suite = None - - def finalize_options(self): - self.ensure_string('test_suite', self.DEFAULT_TEST_SUITE) + return '0.1.0' - def run(self): - """Run the test suite.""" - try: - import unittest2 as unittest - except ImportError: - import unittest - if self.verbose: - verbosity=1 - else: - verbosity=0 - - ex_path = sys.path - sys.path.insert(0, os.path.join(root_dir, 'src')) - loader = unittest.defaultTestLoader - suite = unittest.TestSuite() - - if self.test_suite == self.DEFAULT_TEST_SUITE: - for test_module in loader.discover('.'): - suite.addTest(test_module) - else: - suite.addTest(loader.loadTestsFromName(self.test_suite)) - - result = unittest.TextTestRunner(verbosity=verbosity).run(suite) - sys.path = ex_path - - if not result.wasSuccessful(): - sys.exit(1) +PACKAGE = 'semantic_version' setup( - name="semantic_version", - version=get_version(), + name=PACKAGE, + version=get_version(PACKAGE), author="Raphaël Barrois", author_email="raphael.barrois+semver@polytechnique.org", - description=("A library implementing the 'SemVer' scheme."), - license="BSD", + description="A library implementing the 'SemVer' scheme.", + license='BSD', keywords=['semantic version', 'versioning', 'version'], - url="http://github.com/rbarrois/python-semanticversion", - download_url="http://pypi.python.org/pypi/semantic_version/", - package_dir={'': 'src'}, + url='https://github.com/rbarrois/python-semanticversion', + download_url='http://pypi.python.org/pypi/semantic_version/', packages=['semantic_version'], + setup_requires=[ + 'setuptools>=0.8', + ], classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Topic :: Software Development :: Libraries :: Python Modules", + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Topic :: Software Development :: Libraries :: Python Modules', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', @@ -96,6 +55,5 @@ setup( 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Libraries :: Python Modules' ], - cmdclass={'test': test}, + test_suite='tests', ) - |