Permalink
Browse files

Fixes to setup.py, v1.0.0 to PyPI.

Read in requirements.txt in setup.py to keep them in sync.
  • Loading branch information...
1 parent 789844f commit 19e97c5442e8aebffff3ec91efc012435007feb3 @dracos dracos committed Aug 27, 2013
Showing with 19 additions and 33 deletions.
  1. +1 −1 .travis.yml
  2. +1 −5 CHANGES.txt
  3. +1 −2 MANIFEST.in
  4. 0 {project → }/requirements.txt
  5. +16 −25 setup.py
View
@@ -21,7 +21,7 @@ install:
- ln -s /usr/lib/python2.7/dist-packages/osgeo ~/virtualenv/python2.7/lib/python2.7/site-packages/
- ln -s /usr/lib/python2.7/dist-packages/GDAL-1.7.3.egg-info ~/virtualenv/python2.7/lib/python2.7/site-packages/
- pip install $MODULES --use-mirrors
- - pip install -r project/requirements.txt --use-mirrors
+ - pip install -r requirements.txt --use-mirrors
- wget https://docs.djangoproject.com/en/1.5/_downloads/create_template_postgis-debian.sh
- sudo -u postgres sh create_template_postgis-debian.sh >/dev/null
- sudo sh -c 'echo "standard_conforming_strings = off" >> /etc/postgresql/9.1/main/postgresql.conf'
View
@@ -1,7 +1,3 @@
-v1.0.0pr3, xxxx-xx-xx
-
- -- prefixed all management commands with mapit
- -- convert README into rst and split up into several files
-
+v1.0.0, 2013-08-27 -- Initial proper PyPI release.
v1.0.0pr2, 2011-12-08 -- Add South and factored out hard-coded name and code types into separate database tables.
v1.0.0pr1, 2011-12-07 -- Initial packaged version.
View
@@ -1,5 +1,4 @@
-include LICENSE.txt
-recursive-include docs *.rst
+include LICENSE.txt README.rst requirements.txt
include bin/osm_to_kml
recursive-include project *.py
recursive-include mapit *.html *.json *.sql
File renamed without changes.
View
@@ -1,39 +1,30 @@
-from setuptools import setup
+from setuptools import setup, find_packages
import os
-file_dir = os.path.dirname(__file__)
-if file_dir: os.chdir(file_dir)
+file_dir = os.path.abspath(os.path.dirname(__file__))
-packages = []
-for dirpath, dirnames, filenames in os.walk('mapit'):
- if '__init__.py' in filenames:
- packages.append(dirpath.replace('/', '.'))
+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
setup(
name='django-mapit',
- version='1.0.0pr3',
+ version='1.0.0',
description='A web service for mapping postcodes and points to current or past administrative area information and polygons.',
- long_description=open('README.rst').read(),
+ long_description=read_file('README.rst'),
author='mySociety',
author_email='mapit@mysociety.org',
url='https://github.com/mysociety/mapit',
license='LICENSE.txt',
-
- # TODO: Use find_packages from setuptools
- packages=packages,
-
- # TODO: Use include_package_data=True from setuptools
- package_data={
- 'mapit': [
- 'templates/mapit/*.html',
- 'templates/*/mapit/*.html',
- 'static/mapit/*',
- 'fixtures/*.json',
- 'sql/*.sql',
- ] },
-
- install_requires=[ 'distribute', 'python-memcached', 'Django', 'PyYAML', 'psycopg2', 'South', 'GDAL' ],
-
+ packages=find_packages(exclude=['project']),
+ include_package_data=True,
+ install_requires=install_requires(),
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',

0 comments on commit 19e97c5

Please sign in to comment.