diff --git a/.travis.yml b/.travis.yml index ecfe4643..9f640b3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,20 +24,13 @@ matrix: exclude: - python: "3.3" env: MODULES="Django>=1.4,<1.5 django-tastypie==0.9.16" - # Remove the following two exclusions once SayIt is compatible with Python 3. - - python: "3.3" - env: MODULES="Django>=1.5,<1.6 django-tastypie>=0.10.0" - - python: "3.3" - env: MODULES="Django>=1.6,<1.7 django-tastypie>=0.10.0" install: - sudo apt-get update -qq - sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb - - gem install --conservative --no-ri --no-rdoc sass -v 3.2.14 - - gem install --conservative --no-ri --no-rdoc compass -v 0.12.2 - - gem install --conservative --no-ri --no-rdoc zurb-foundation -v 4.3.2 - pip install $MODULES - - pip install -r requirements-testing.txt + - if [ $TRAVIS_PYTHON_VERSION = 3.3 ]; then pip install -r requirements-py3.txt; fi + - pip install -e .[test] before_script: - psql -c 'create database "sayit-example-project";' -U postgres diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 00000000..7efa6d72 --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,19 @@ +v1.1, 2014-07-04 + * Display improvements, including to the default front page, the speech + detail page, nicer empty content messages and various tweaks + * Editing improvements, including a much nicer speech editing form, with + inline creation of new speakers and sections + * django-popolo is now used to store people data + * Python 3 compatibility + * Removal of unneeded dependencies + * Included git pre-commit hook for CSS compilation + * Realtime search processer enabled in the example project + * Akoma Ntoso import + * Support coverPage and docTitle + * Log rather than die on error + * Namespace handling fix + +Thanks to Richard Lewis, James McKinney, Duncan Parkes, Matthew Somerville, and +Zarino Zappia for their work on this release. + +v1.0, 2014-04-16 -- Initial release. diff --git a/MANIFEST.in b/MANIFEST.in index cb6ec116..f714a10e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ -recursive-include web * +include *.txt +recursive-include speeches/locale * recursive-include speeches/static * recursive-include speeches/templates * diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 1bdc560e..00000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,12 +0,0 @@ --r requirements-testing.txt - -# Only for debugging, but very useful and easiest to just have it here -django-debug-toolbar - -# For akomantoso import -python-dateutil<2 -lxml - -# For migrations -South -popit-django==0.0.3 diff --git a/requirements-py3.txt b/requirements-py3.txt new file mode 100644 index 00000000..d7167bce --- /dev/null +++ b/requirements-py3.txt @@ -0,0 +1 @@ +-e git+https://bitbucket.org/jpmckinney/django-bleach.git@python3#egg=django-bleach diff --git a/requirements-scraping.txt b/requirements-scraping.txt deleted file mode 100644 index d0fc5002..00000000 --- a/requirements-scraping.txt +++ /dev/null @@ -1,5 +0,0 @@ -# These packages are required for using utils.scraping -# but don't otherwise need to be installed - -beautifulsoup4 -requests_cache diff --git a/requirements-testing.txt b/requirements-testing.txt deleted file mode 100644 index 989c65f6..00000000 --- a/requirements-testing.txt +++ /dev/null @@ -1,11 +0,0 @@ --r requirements.txt - -# Testing -selenium -mock - -# We use nose to run the tests, which gets around various limitations -# with the built-in test runner: -django-nose==1.2 - -Mutagen diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fa484998..00000000 --- a/requirements.txt +++ /dev/null @@ -1,32 +0,0 @@ -# List all Python package requirements this project has. -# -# more details: http://www.pip-installer.org/en/latest/requirements.html - -### General useful bits -psycopg2 -pytz -six - -### Django related -Django>=1.4.2 -Django-Select2==4.2.2 -django-qmethod -django-bleach - -# For finding the lengths of MP3 files -audioread - -### Django related registration -# The registration app is a little out of date - get it from the repo direct.... -# django-registration -#-e hg+https://bitbucket.org/ubernostrum/django-registration@fad7080fe769#egg=django-registration -#django-registration-defaults - -# Search engine -pyelasticsearch -django-haystack - -# mySociety modules -mysociety-django-popolo==0.0.2 -mysociety-django-sluggable==0.2.5 -django-subdomain-instances==0.4 diff --git a/setup.py b/setup.py index a81e6166..4770b587 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ from setuptools import setup, find_packages import os +import sys file_dir = os.path.abspath(os.path.dirname(__file__)) @@ -7,15 +8,15 @@ def read_file(filename): filepath = os.path.join(file_dir, filename) return open(filepath).read() -def install_requires(): - reqs = read_file('requirements.txt') - reqs = reqs.splitlines() - reqs = [ x for x in reqs if x and x[0] != '#' and x[0:2] != '-e' ] - return reqs +# Fix for Select2 py3 branching +if sys.version_info >= (3,): + select2 = 'Django-Select2-Py3 >= 4.2.1, < 4.3' +else: + select2 = 'Django-Select2 >= 4.2.2, < 4.3' setup( name="django-sayit", - version='1.0.0', + version='1.1.0', description='A data store for speeches and transcripts to make them searchable and pretty.', long_description=read_file('README.rst'), author='mySociety', @@ -23,7 +24,40 @@ def install_requires(): url='https://github.com/mysociety/sayit', packages=find_packages(exclude=('example_project', 'example_project.*')), include_package_data=True, - install_requires=install_requires(), + install_requires=[ + 'psycopg2 >= 2.5.1, < 2.6', + 'pytz >= 2013d', + 'six >= 1.4.1', + 'Django >= 1.4, < 1.7', + select2, + 'django-qmethod == 0.0.3', + 'django-bleach >= 0.1.5', + 'audioread >= 1.0.1', + 'pyelasticsearch >= 0.6, < 0.7', + 'django-haystack >= 2.1, < 2.2', + 'mysociety-django-popolo >= 0.0.2', + 'mysociety-django-sluggable >= 0.2.5', + 'django-subdomain-instances >= 0.4', + ], + extras_require={ + 'test': [ + 'selenium', + 'mock', + 'django-nose == 1.2', + 'Mutagen', + ], + 'develop': [ + 'django-debug-toolbar', + 'python-dateutil < 2', + 'lxml', + 'South', + 'popit-django == 0.0.3', + ], + 'scraping': [ + 'beautifulsoup4', + 'requests_cache', + ], + }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment',