Normalize docs to docs/ (Closes #5).
Also normalize the package layout. Thanks @jdowner-gb & tleach for the report.
This commit is contained in:
14
.gitignore
vendored
14
.gitignore
vendored
@@ -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
|
||||
|
||||
97
ChangeLog
Normal file
97
ChangeLog
Normal file
@@ -0,0 +1,97 @@
|
||||
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:
|
||||
2
Makefile
2
Makefile
@@ -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
|
||||
|
||||
@@ -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:
|
||||
1
docs/changelog.rst
Symbolic link
1
docs/changelog.rst
Symbolic link
@@ -0,0 +1 @@
|
||||
../ChangeLog
|
||||
@@ -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:
|
||||
88
setup.py
88
setup.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'
|
||||
return '0.1.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)
|
||||
|
||||
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',
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user