Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4024022

Browse files
committedDec 25, 2011
installing SQL data
1 parent ffcd918 commit 4024022

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎geonames/management/commands/load_geonames.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def handle_noargs(self, **options):
5959
# overhead from using the ORM. Moreover, copying from a gzipped file
6060
# reduces disk I/O.
6161
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
62-
copy_cmd = 'zcat %(gz_file)s | psql %(db_opts)s -c "%(copy_sql)s"'
62+
copy_cmd = 'gunzip -c %(gz_file)s | psql %(db_opts)s -c "%(copy_sql)s"'
6363
copy_args = {'gz_file' : os.path.join(GEONAMES_DATA, 'allCountries.gz'),
6464
'db_opts' : db_opts,
6565
'copy_sql' : copy_sql

‎setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/usr/bin/env python
22

3-
from distutils.core import setup
3+
from setuptools import setup, find_packages
44

55
setup(name='django-geonames',
66
version=__import__('geonames').__version__,
77
description='Fork of official GeoDjango geonames application refactored and adopted for Django 1.2.1',
88
author='Justin Bronn',
99
author_email='jbronn@geodjango.org',
1010
url='https://github.com/ramusus/django-geonames/',
11-
packages=['geonames', 'geonames.management', 'geonames.management.commands'],
11+
packages = find_packages(),
12+
include_package_data = True,
13+
package_data = {
14+
'geonames' : ['sql/*.sql']
15+
}
1216
)
1317

0 commit comments

Comments
 (0)
Please sign in to comment.