Skip to content

Commit

Permalink
Merge pull request #320 from nephila/feature/future_django
Browse files Browse the repository at this point in the history
Versions updates
  • Loading branch information
yakky committed Jan 14, 2018
2 parents 735ceb1 + 98e338b commit 81cbdda
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 232 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ python:
- 3.6
- 3.5
- 3.4
- 3.3
- 2.7

env:
Expand All @@ -29,7 +28,6 @@ before_install:
install:
- pip install -U tox virtualenv coveralls
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export TOX_ENV=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export TOX_ENV=py33; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export TOX_ENV=py34; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export TOX_ENV=py35; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export TOX_ENV=py36; fi"
Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ History
++++++++++++++++++

* Dropped cmsplugin-filer in favor of core plugins which now use filer
* Added django CMS 3.5

0.9.8 (2018-01-10)
++++++++++++++++++
Expand Down
81 changes: 41 additions & 40 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,7 @@
django CMS Installer
====================

.. image:: https://img.shields.io/pypi/v/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer
:alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer
:alt: Monthly downloads

.. image:: https://img.shields.io/pypi/pyversions/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer
:alt: Python versions

.. image:: https://img.shields.io/travis/nephila/djangocms-installer.svg?style=flat-square
:target: https://travis-ci.org/nephila/djangocms-installer
:alt: Latest Travis CI build status

.. image:: https://img.shields.io/coveralls/nephila/djangocms-installer/master.svg?style=flat-square
:target: https://coveralls.io/r/nephila/djangocms-installer?branch=master
:alt: Test coverage

.. image:: https://img.shields.io/codecov/c/github/nephila/djangocms-installer/master.svg?style=flat-square
:target: https://codecov.io/github/nephila/djangocms-installer
:alt: Test coverage

.. image:: https://codeclimate.com/github/nephila/djangocms-installer/badges/gpa.svg?style=flat-square
:target: https://codeclimate.com/github/nephila/djangocms-installer
:alt: Code Climate
|Gitter| |PyPiVersion| |PyVersion| |Status| |TestCoverage| |CodeClimate| |License|

Command to easily bootstrap django CMS projects

Expand All @@ -42,8 +16,8 @@ project.

Refer to `django CMS Tutorial`_ on how to properly setup your first django CMS project.

.. warning:: Version 0.9 dropped support for Python 2.6, Django <1.8 and django CMS < 3.2.
More 0.8.x versions may be released after 0.9 is out in case important bugfixes will
.. warning:: Version 1.0 dropped support for Python 3.3 and django CMS < 3.4.
More 0.9.x versions may be released after 1.0 is out in case important bugfixes will
be needed.

Usage
Expand Down Expand Up @@ -95,17 +69,15 @@ Supported versions

The current supported version matrix is the following:

+----------------+-------------+-------------+---------------+
| | Django 1.8 | Django 1.9 | Django 1.10 |
+----------------+-------------+-------------+---------------+
| django CMS 3.2 | Supported | Supported | Unsupported |
+----------------+-------------+-------------+---------------+
| django CMS 3.3 | Supported | Supported | Unsupported |
+----------------+-------------+-------------+---------------+
| django CMS 3.4 | Supported | Supported | Supported |
+----------------+-------------+-------------+---------------+
+----------------+-------------+-------------+---------------+---------------+
| | Django 1.8 | Django 1.9 | Django 1.10 | Django 1.11 |
+----------------+-------------+-------------+---------------+---------------+
| django CMS 3.4 | Supported | Supported | Supported | Supported |
+----------------+-------------+-------------+---------------+---------------+
| django CMS 3.5 | Supported | Supported | Supported | Supported |
+----------------+-------------+-------------+---------------+---------------+

See `version 0.8`_ for older Django / django CMS versions support
See `version 0.9`_ for older Django / django CMS versions support

Any beta and develop version of Django and django CMS, by its very nature,
it's not supported, while it still may work.
Expand Down Expand Up @@ -136,6 +108,35 @@ Please check that the ``.py`` extension is associated correctly with Python inte
Python.File="C:\Windows\py.exe" "%1" %*


.. _version 0.8: https://github.com/nephila/djangocms-installer/tree/release/0.8.x#supported-versions
.. _version 0.9: https://github.com/nephila/djangocms-installer/tree/release/0.9.x#supported-versions
.. _django CMS Tutorial: https://django-cms.readthedocs.io/en/latest/introduction/index.html
.. _installer usage page: http://djangocms-installer.readthedocs.io/en/latest/usage.html


.. |Gitter| image:: https://img.shields.io/badge/GITTER-join%20chat-brightgreen.svg?style=flat-square
:target: https://gitter.im/nephila/applications
:alt: Join the Gitter chat

.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer
:alt: Latest PyPI version

.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer
:alt: Python versions

.. |Status| image:: https://img.shields.io/travis/nephila/djangocms-installer.svg?style=flat-square
:target: https://travis-ci.org/nephila/djangocms-installer
:alt: Latest Travis CI build status

.. |TestCoverage| image:: https://img.shields.io/coveralls/nephila/djangocms-installer/master.svg?style=flat-square
:target: https://coveralls.io/r/nephila/djangocms-installer?branch=master
:alt: Test coverage

.. |License| image:: https://img.shields.io/github/license/nephila/djangocms-installer.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-installer/
:alt: License

.. |CodeClimate| image:: https://codeclimate.com/github/nephila/djangocms-installer/badges/gpa.svg?style=flat-square
:target: https://codeclimate.com/github/nephila/djangocms-installer
:alt: Code Climate
40 changes: 18 additions & 22 deletions djangocms_installer/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,19 @@ def parse(args):
# Convert version to numeric format for easier checking
try:
django_version, cms_version = supported_versions(args.django_version, args.cms_version)
except RuntimeError as e:
cms_package = data.PACKAGE_MATRIX.get(
cms_version, data.PACKAGE_MATRIX[data.DJANGOCMS_LTS]
)
except RuntimeError as e: # pragma: no cover
sys.stderr.write(compat.unicode(e))
sys.exit(6)
if django_version is None:
if django_version is None: # pragma: no cover
sys.stderr.write(
'Please provide a Django supported version: {0}. Only Major.Minor '
'version selector is accepted\n'.format(', '.join(data.DJANGO_SUPPORTED))
)
sys.exit(6)
if django_version is None:
if cms_version is None: # pragma: no cover
sys.stderr.write(
'Please provide a django CMS supported version: {0}. Only Major.Minor '
'version selector is accepted\n'.format(', '.join(data.DJANGOCMS_SUPPORTED))
Expand All @@ -244,36 +247,32 @@ def parse(args):

# django CMS version check
if args.cms_version == 'develop':
requirements.append(data.DJANGOCMS_DEVELOP)
requirements.append(cms_package)
warnings.warn(data.VERSION_WARNING.format('develop', 'django CMS'))
elif args.cms_version == 'rc': # pragma: no cover
requirements.append(data.DJANGOCMS_RC)
requirements.append(cms_package)
elif args.cms_version == 'beta': # pragma: no cover
requirements.append(data.DJANGOCMS_BETA)
requirements.append(cms_package)
warnings.warn(data.VERSION_WARNING.format('beta', 'django CMS'))
else:
requirements.append('django-cms<{0}'.format(less_than_version(cms_version)))
requirements.append(cms_package)

if args.cms_version in ('rc', 'develop'):
requirements.extend(data.REQUIREMENTS['cms-master'])
elif LooseVersion(cms_version) >= LooseVersion('3.5'):
requirements.extend(data.REQUIREMENTS['cms-3.5'])
elif LooseVersion(cms_version) >= LooseVersion('3.4'):
requirements.extend(data.REQUIREMENTS['cms-3.4'])
elif LooseVersion(cms_version) >= LooseVersion('3.3'):
requirements.extend(data.REQUIREMENTS['cms-3.3'])
elif LooseVersion(cms_version) >= LooseVersion('3.2'):
requirements.extend(data.REQUIREMENTS['cms-3.2'])

if not args.no_db_driver:
requirements.append(args.db_driver)
if not args.no_plugins:
if args.cms_version in ('rc', 'develop'):
requirements.extend(data.REQUIREMENTS['plugins-master'])
elif LooseVersion(cms_version) >= LooseVersion('3.5'):
requirements.extend(data.REQUIREMENTS['plugins-3.5'])
elif LooseVersion(cms_version) >= LooseVersion('3.4'):
requirements.extend(data.REQUIREMENTS['plugins-3.4'])
elif LooseVersion(cms_version) >= LooseVersion('3.3'):
requirements.extend(data.REQUIREMENTS['plugins-3.3'])
else:
requirements.extend(data.REQUIREMENTS['plugins-3.2'])
requirements.extend(data.REQUIREMENTS['filer'])

if args.aldryn: # pragma: no cover
Expand All @@ -293,19 +292,16 @@ def parse(args):
if args.use_timezone:
requirements.append('pytz')

# Reversion package version depends on django version
if args.reversion and cms_version in ('3.2', '3.3'):
if django_version == '1.8':
requirements.extend(data.REQUIREMENTS['reversion-django-1.8'])
elif django_version == '1.9':
requirements.extend(data.REQUIREMENTS['reversion-django-1.9'])

if django_version == '1.8':
requirements.extend(data.REQUIREMENTS['django-1.8'])
elif django_version == '1.9':
requirements.extend(data.REQUIREMENTS['django-1.9'])
elif django_version == '1.10':
requirements.extend(data.REQUIREMENTS['django-1.10'])
elif django_version == '1.11':
requirements.extend(data.REQUIREMENTS['django-1.11'])
elif django_version == '2.0': # pragma: no cover
requirements.extend(data.REQUIREMENTS['django-2.0'])

requirements.extend(data.REQUIREMENTS['default'])

Expand Down
95 changes: 41 additions & 54 deletions djangocms_installer/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,32 @@
DJANGOCMS_DEVELOP = 'https://github.com/divio/django-cms/archive/develop.zip?{bust}'.format(
**bust
)
DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/release/3.4.x.zip?{bust}'.format(
DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/develop.zip?{bust}'.format(
**bust
)
DJANGOCMS_BETA = 'https://github.com/divio/django-cms/archive/3.0.0.beta3.zip'
DJANGOCMS_BETA = DJANGOCMS_DEVELOP
DJANGOCMS_34 = 'django-cms>=3.4,<3.5'
DJANGOCMS_35 = DJANGOCMS_RC

if sys.version_info >= (3, 5):
DJANGOCMS_SUPPORTED = ('3.2', '3.3', '3.4', 'stable', 'lts', 'develop')
DJANGOCMS_STABLE = '3.4'
if sys.version_info >= (3, 4):
DJANGOCMS_SUPPORTED = ('3.4', '3.5', 'stable', 'lts', 'develop')
DJANGOCMS_STABLE = '3.5'
DJANGOCMS_LTS = '3.4'
else:
DJANGOCMS_SUPPORTED = ('3.2', '3.3', '3.4', 'stable', 'lts', 'develop')
DJANGOCMS_STABLE = '3.4'
DJANGOCMS_SUPPORTED = ('3.4', '3.5', 'stable', 'lts', 'develop')
DJANGOCMS_STABLE = '3.5'
DJANGOCMS_LTS = '3.4'

DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?{bust}'.format(**bust)
DJANGO_BETA = 'https://github.com/django/django/archive/master.zip?{bust}'.format(**bust)
if sys.version_info >= (3, 5):
DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', 'stable', 'lts')
DJANGO_STABLE = '1.10'
DJANGO_LTS = '1.8'
elif sys.version_info >= (3, 4):
DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', 'stable', 'lts')
DJANGO_STABLE = '1.10'
DJANGO_LTS = '1.8'
elif sys.version_info >= (3, 3):
DJANGO_SUPPORTED = ('1.8', 'stable', 'lts')
DJANGO_STABLE = '1.8'
DJANGO_LTS = '1.8'
if sys.version_info >= (3, 4):
DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', '1.11', 'stable', 'lts')
DJANGO_STABLE = '1.11'
DJANGO_LTS = '1.11'
else:
DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', 'stable', 'lts')
DJANGO_STABLE = '1.10'
DJANGO_LTS = '1.8'
DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', '1.11', 'stable', 'lts')
DJANGO_STABLE = '1.11'
DJANGO_LTS = '1.11'

CMS_VERSION_MATRIX = {
'stable': DJANGOCMS_STABLE,
Expand All @@ -62,10 +56,12 @@
'develop': '1.11'
}
VERSION_MATRIX = {
'3.2': ('1.8', '1.9'),
'3.3': ('1.8', '1.9'),
'3.4': ('1.8', '1.10'),
'3.5': ('1.8', '1.10'),
'3.4': ('1.8', '1.11'),
'3.5': ('1.8', '1.11'),
}
PACKAGE_MATRIX = {
'3.4': DJANGOCMS_34,
'3.5': DJANGOCMS_35,
}

REQUIREMENTS = {
Expand All @@ -82,6 +78,8 @@
],
'django-1.10': [
],
'django-1.11': [
],
'reversion-django-1.8': [
'django-reversion>=1.10,<1.11',
],
Expand All @@ -91,44 +89,21 @@
'reversion-django-1.10': [
'django-reversion>=2.0,<2.1',
],
'cms-3.2': [
'djangocms-admin-style>=1.1.1,<1.3',
'django-treebeard>=4.0,<5.0',
'reversion-django-1.11': [
'django-reversion>=2.0,<2.1',
],
'cms-3.3': [
'cms-3.4': [
'djangocms-admin-style>=1.2,<1.3',
'django-treebeard>=4.0,<5.0',
],
'cms-3.4': [
'cms-3.5': [
'djangocms-admin-style>=1.2,<1.3',
'django-treebeard>=4.0,<5.0',
],
'cms-master': [
'https://github.com/divio/djangocms-admin-style/archive/master.zip?{bust}'.format(**bust),
'django-treebeard>=4.0,<5.0',
],
'plugins-3.2': [
'djangocms-text-ckeditor>=2.8.1,<3.0',
'djangocms-link>=1.8,<2.0',
'djangocms-style>=1.7,<2.0',
'djangocms-googlemap>=0.5,<1.0',
'djangocms-snippet>=1.9,<2.0',
'djangocms-video>=1.1,<2.0',
'djangocms-column>=1.6,<1.7',
'djangocms-file>=1.0,<1.1',
'djangocms-picture>=0.2.0,<0.3',
],
'plugins-3.3': [
'djangocms-text-ckeditor>=3.2.1',
'djangocms-link>=1.8',
'djangocms-style>=1.7',
'djangocms-googlemap>=0.5',
'djangocms-snippet>=1.9',
'djangocms-video>=2.0',
'djangocms-column>=1.6',
'djangocms-file>=1.0,<1.1',
'djangocms-picture>=0.2.0,<0.3',
],
'plugins-3.4': [
'djangocms-text-ckeditor>=3.2.1',
'djangocms-link>=1.8',
Expand All @@ -140,6 +115,18 @@
'djangocms-file>=2.0,<3.0',
'djangocms-picture>=2.0,<3.0',
],
'plugins-3.5': [
'https://github.com/divio/djangocms-text-ckeditor/archive/master.zip?{bust}'
''.format(**bust),
'https://github.com/divio/djangocms-file/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-link/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-style/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-googlemap/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-snippet/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-picture/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-video/archive/master.zip?{bust}'.format(**bust),
'https://github.com/divio/djangocms-column/archive/master.zip?{bust}'.format(**bust),
],
'plugins-master': [
'https://github.com/divio/djangocms-text-ckeditor/archive/master.zip?{bust}'
''.format(**bust),
Expand All @@ -158,7 +145,7 @@
],
'filer': [
'easy_thumbnails',
'django-filer>=1.2',
'django-filer>=1.3',
],
}

Expand Down
2 changes: 0 additions & 2 deletions djangocms_installer/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ def _build_settings(config_data):

if not config_data.no_plugins:
apps.extend(vars.FILER_PLUGINS_3)
if LooseVersion(config_data.cms_version) > LooseVersion('3.4'):
apps.remove('djangocms_snippet')

if config_data.aldryn: # pragma: no cover
apps.extend(vars.ALDRYN_APPLICATIONS)
Expand Down

0 comments on commit 81cbdda

Please sign in to comment.