def test_get_version(self): """ Test the version-info reporting. """ versions = [ {'version': (0, 8, 0, 'final', 0), 'expected': "0.8"}, ] for version_dict in versions: registration.VERSION = version_dict['version'] self.assertEqual(registration.get_version(), version_dict['expected'])
def test_get_version(self): """ Test the version-info reporting. """ versions = [ {'version': (1, 0, 0, 'alpha', 0), 'expected': "1.0 pre-alpha"}, {'version': (1, 0, 1, 'alpha', 1), 'expected': "1.0.1 alpha 1"}, {'version': (1, 1, 0, 'beta', 2), 'expected': "1.1 beta 2"}, {'version': (1, 2, 1, 'rc', 3), 'expected': "1.2.1 rc 3"}, {'version': (1, 3, 0, 'final', 0), 'expected': "1.3"}, {'version': (1, 4, 1, 'beta', 0), 'expected': "1.4.1 beta"}, ] for version_dict in versions: registration.VERSION = version_dict['version'] self.assertEqual(registration.get_version(), version_dict['expected'])
def test_get_version(self): """ Test the version-info reporting. """ versions = [ {'version': (1, 0, 0, 'alpha', 0), 'expected': r'1\.0(\.dev\d+)?'}, {'version': (1, 0, 1, 'alpha', 1), 'expected': r'1\.0\.1a1'}, {'version': (1, 1, 0, 'beta', 2), 'expected': r'1.1b2'}, {'version': (1, 2, 1, 'rc', 3), 'expected': r'1.2.1c3'}, {'version': (1, 3, 0, 'final', 0), 'expected': r'1.3'}, {'version': (1, 4, 1, 'beta', 0), 'expected': r'1.4.1b'}, ] for version_dict in versions: registration.VERSION = version_dict['version'] self.assertRegexpMatches(registration.get_version(), version_dict['expected'])
def test_get_version(self): """ Test the version-info reporting. """ versions = [ { 'version': (1, 0, 0, 'alpha', 0), 'expected': "1.0 pre-alpha" }, { 'version': (1, 0, 1, 'alpha', 1), 'expected': "1.0.1 alpha 1" }, { 'version': (1, 1, 0, 'beta', 2), 'expected': "1.1 beta 2" }, { 'version': (1, 2, 1, 'rc', 3), 'expected': "1.2.1 rc 3" }, { 'version': (1, 3, 0, 'final', 0), 'expected': "1.3" }, { 'version': (1, 4, 1, 'beta', 0), 'expected': "1.4.1 beta" }, ] for version_dict in versions: registration.VERSION = version_dict['version'] self.assertEqual(registration.get_version(), version_dict['expected'])
class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): # import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) setup( name='django-registration-redux', version=get_version().replace(' ', '-'), description='An extensible user-registration application for Django', long_description=open('README.rst').read(), author='Andrew Cutler', author_email='*****@*****.**', url='https://github.com/macropin/django-registration', package_dir={'registration': 'registration'}, packages=find_packages(exclude='test_app'), tests_require=['pytest-django'], cmdclass={'test': PyTest}, include_package_data=True, classifiers=['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License',
# The encoding of source files. #source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = u'django-pluggable-registration' copyright = u'2011, Rafael Durán Castañeda' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = registration.get_version()[:3] # The full version, including alpha/beta/rc tags. release = registration.get_version() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = []
import os from setuptools import setup, find_packages from registration import get_version TEST_REQUIREMENTS = [ 'django>=1.8', ] README = os.path.join(os.path.dirname(__file__), 'README') setup( name="django-registration-gv", version=get_version(), author="Aaron Madison", description="Django registration app", url="https://github.com/madisona/django-registration", test_suite='runtests.runtests', packages=find_packages(exclude=["example"]), include_package_data=True, tests_require=TEST_REQUIREMENTS, classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License",
if dirname.startswith("."): del dirnames[i] if "__init__.py" in filenames: pkg = dirpath.replace(os.path.sep, ".") if os.path.altsep: pkg = pkg.replace(os.path.altsep, ".") packages.append(pkg) elif filenames: prefix = dirpath[13:] # Strip "registration/" or "registration\" for f in filenames: data_files.append(os.path.join(prefix, f)) setup( name="django-registration", version=get_version().replace(" ", "-"), description="An extensible user-registration application for Django", author="James Bennett", author_email="*****@*****.**", url="https://github.com/ubernostrum//ubernostrum/django-registration/", download_url="https://github.com/ubernostrum/django-registration/archive/1.1.tar.gz", package_dir={"registration": "registration"}, packages=packages, package_data={"registration": data_files}, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent",