Skip to content

Commit

Permalink
Fixes to setup.py, v1.0.0 to PyPI.
Browse files Browse the repository at this point in the history
Read in requirements.txt in setup.py to keep them in sync.
  • Loading branch information
dracos committed Aug 27, 2013
1 parent 789844f commit 19e97c5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 1 addition & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
41 changes: 16 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 19e97c5

Please sign in to comment.