Permalink
Browse files

Merge pull request #4 from gugu/master

Added support for MacOS X (zcat works only for .Z files), added SQL files to distribution
  • Loading branch information...
2 parents ffcd918 + 4024022 commit c2f93cd986117e6721a5152aacb9fa6c62daa39a @ramusus committed Dec 27, 2011
Showing with 7 additions and 3 deletions.
  1. +1 −1 geonames/management/commands/load_geonames.py
  2. +6 −2 setup.py
@@ -59,7 +59,7 @@ def handle_noargs(self, **options):
# overhead from using the ORM. Moreover, copying from a gzipped file
# reduces disk I/O.
copy_sql = "COPY %s (geonameid,name,alternates,fclass,fcode,country,cc2,admin1,admin2,admin3,admin4,population,elevation,topo,timezone,moddate,point) FROM STDIN;" % db_table
- copy_cmd = 'zcat %(gz_file)s | psql %(db_opts)s -c "%(copy_sql)s"'
+ copy_cmd = 'gunzip -c %(gz_file)s | psql %(db_opts)s -c "%(copy_sql)s"'
copy_args = {'gz_file' : os.path.join(GEONAMES_DATA, 'allCountries.gz'),
'db_opts' : db_opts,
'copy_sql' : copy_sql
View
@@ -1,13 +1,17 @@
#!/usr/bin/env python
-from distutils.core import setup
+from setuptools import setup, find_packages
setup(name='django-geonames',
version=__import__('geonames').__version__,
description='Fork of official GeoDjango geonames application refactored and adopted for Django 1.2.1',
author='Justin Bronn',
author_email='jbronn@geodjango.org',
url='https://github.com/ramusus/django-geonames/',
- packages=['geonames', 'geonames.management', 'geonames.management.commands'],
+ packages = find_packages(),
+ include_package_data = True,
+ package_data = {
+ 'geonames' : ['sql/*.sql']
+ }
)

0 comments on commit c2f93cd

Please sign in to comment.