kopia lustrzana https://github.com/wagtail/wagtail
Move version from wagtail.wagtailcore to wagtail
This is where developers expect it to be, similar to Django and other projects. The version info still exists at the old `wagtail.wagtailcore` location, for backwards compatibility. Fixes #2557pull/2877/merge
rodzic
948cc5190d
commit
75e58efab8
|
@ -37,6 +37,6 @@ webpack
|
||||||
|
|
||||||
## How to release
|
## How to release
|
||||||
|
|
||||||
The front-end is bundled at the same time as the Wagtail project, via `setuptools`. You'll need to set the `__semver__` property to a npm-compliant version number in `wagtail.wagtailcore`.
|
The front-end is bundled at the same time as the Wagtail project, via `setuptools`.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ copyright = u'2015, Torchbox'
|
||||||
# built documents.
|
# built documents.
|
||||||
|
|
||||||
# Get Wagtail version
|
# Get Wagtail version
|
||||||
from wagtail.wagtailcore import __version__, VERSION
|
from wagtail import __version__, VERSION
|
||||||
|
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '{}.{}'.format(VERSION[0], VERSION[1])
|
version = '{}.{}'.format(VERSION[0], VERSION[1])
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from wagtail.wagtailcore import __version__
|
from wagtail import __version__
|
||||||
from wagtail.utils.setup import assets, sdist, check_bdist_egg
|
from wagtail.utils.setup import assets, sdist, check_bdist_egg
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
from wagtail.utils.version import get_semver_version, get_version
|
||||||
|
|
||||||
|
# major.minor.patch.release.number
|
||||||
|
# release must be one of alpha, beta, rc, or final
|
||||||
|
VERSION = (1, 7, 0, 'alpha', 0)
|
||||||
|
|
||||||
|
__version__ = get_version(VERSION)
|
||||||
|
|
||||||
|
# Required for npm package for frontend
|
||||||
|
__semver__ = get_semver_version(VERSION)
|
|
@ -7,7 +7,7 @@ from django.utils.six.moves.urllib.error import HTTPError, URLError
|
||||||
from django.utils.six.moves.urllib.parse import urlencode, urlparse, urlunparse
|
from django.utils.six.moves.urllib.parse import urlencode, urlparse, urlunparse
|
||||||
from django.utils.six.moves.urllib.request import Request, urlopen
|
from django.utils.six.moves.urllib.request import Request, urlopen
|
||||||
|
|
||||||
from wagtail.wagtailcore import __version__
|
from wagtail import __version__
|
||||||
|
|
||||||
logger = logging.getLogger('wagtail.frontendcache')
|
logger = logging.getLogger('wagtail.frontendcache')
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from setuptools import Command
|
||||||
from setuptools.command.bdist_egg import bdist_egg
|
from setuptools.command.bdist_egg import bdist_egg
|
||||||
from setuptools.command.sdist import sdist as base_sdist
|
from setuptools.command.sdist import sdist as base_sdist
|
||||||
|
|
||||||
from wagtail.wagtailcore import __semver__
|
from wagtail import __semver__
|
||||||
|
|
||||||
|
|
||||||
class assets_mixin(object):
|
class assets_mixin(object):
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
from __future__ import absolute_import, unicode_literals
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
from wagtail.utils.version import get_semver_version, get_version
|
# Imported for historical reasons
|
||||||
|
from wagtail import __semver__, __version__ # noqa
|
||||||
# major.minor.patch.release.number
|
|
||||||
# release must be one of alpha, beta, rc, or final
|
|
||||||
VERSION = (1, 7, 0, 'alpha', 0)
|
|
||||||
|
|
||||||
__version__ = get_version(VERSION)
|
|
||||||
|
|
||||||
# Required for npm package for frontend
|
|
||||||
__semver__ = get_semver_version(VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.template.defaulttags import token_kwargs
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
from wagtail.wagtailcore import __version__
|
from wagtail import __version__
|
||||||
from wagtail.wagtailcore.models import Page
|
from wagtail.wagtailcore.models import Page
|
||||||
from wagtail.wagtailcore.rich_text import RichText, expand_db_html
|
from wagtail.wagtailcore.rich_text import RichText, expand_db_html
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,9 @@ from django.template import engines
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from wagtail import __version__
|
||||||
from wagtail.tests.testapp.blocks import SectionBlock
|
from wagtail.tests.testapp.blocks import SectionBlock
|
||||||
from wagtail.wagtailcore import __version__, blocks
|
from wagtail.wagtailcore import blocks
|
||||||
from wagtail.wagtailcore.models import Page, Site
|
from wagtail.wagtailcore.models import Page, Site
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue