Skip to content

Commit 4374a02

Browse files
committed
Merge pull request #17 from mattmakesmaps/development
Release 0.2.1
2 parents 0199450 + 9b46058 commit 4374a02

File tree

8 files changed

+46
-12
lines changed

8 files changed

+46
-12
lines changed

CHANGES.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
v<version>, <date> -- Initial release.
1+
=======
2+
CHANGES
3+
=======
4+
5+
Release 0.2.1
6+
-------------
7+
8+
* Convert to setuptools build process.
9+
* Converted pgsql2gist.py script to pgsql2gist entry point.
10+
* Added nosetests to setup.py.
11+
* Added keywords and classifiers to setup.py.
12+
13+
Release 0.2.0
14+
-------------
15+
16+
* Initial Release as PyPi package.

README.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ See issues for additional features to be implemented.
1616
Current Usage / Caveats
1717
=======================
1818

19+
Listed below is the --help usage information.::
20+
1921
POST GeoJSON or TopoJSON features from PostGIS to a Github Gist.
2022

2123
Example usage: python pgsql2gist.py --host localhost --user matt tilestache \

pgsql2gist/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
__author__ = 'matt'
22
__date__ = '11/24/13'
3+
34
# From each module, add the relevant class into the pgsql2gist package namespace.
45
from .gisthandler import GistAPIHandler
56
from .pgconn import PostGISConnection

pgsql2gist.py renamed to pgsql2gist/command_line.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
__author__ = 'matt'
1+
#! /usr/bin/env python
2+
__author__ = 'Matthew Kenny'
23
__date__ = '11/19/13'
3-
__version__ = '0.1'
44
"""
55
POST GeoJSON or TopoJSON features from PostGIS to a Github Gist.
66
@@ -38,13 +38,11 @@
3838

3939
# Import relevant modules from the pgsql2gist package.
4040
import time
41-
4241
from psycopg2 import Error
43-
4442
from pgsql2gist import GistAPIHandler, PostGISConnection, CLIInterface, GeoJSONConstructor
4543

4644

47-
if __name__ == '__main__':
45+
def main():
4846
try:
4947
# Setup CLI; Parse User Input
5048
arg_parse = CLIInterface()
@@ -57,7 +55,7 @@
5755
except Error as e:
5856
print "PostGIS SQL Execution Error: ", e.message
5957
raise e
60-
# Get results
58+
# Get results
6159
query_results = db.fetchall()
6260

6361
# Create GeoJSON Feature Collection
@@ -80,3 +78,7 @@
8078
print "ERROR: ", e.message
8179
print 'Terminating Script'
8280
raise SystemExit
81+
82+
83+
if __name__ == '__main__':
84+
main()

pgsql2gist/tests/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__author__ = 'matt'
2+
__date__ = '12/7/13'
File renamed without changes.
File renamed without changes.

setup.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
from distutils.core import setup
1+
from setuptools import setup
22

33
setup(
4-
name='Pgsql2Gist',
5-
version='0.2.0',
4+
name='pgsql2gist',
5+
version='0.2.1',
66
author='Matthew Kenny',
77
author_email='matthewkenny AT gmail DOT com',
8+
classifiers=[
9+
'Development Status :: 3 - Alpha',
10+
'Topic :: Scientific/Engineering :: GIS',
11+
'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)',
12+
'Intended Audience :: Developers'
13+
],
814
packages=['pgsql2gist'],
9-
scripts=['pgsql2gist.py'],
15+
entry_points = {
16+
'console_scripts': ['pgsql2gist=pgsql2gist.command_line:main'],
17+
},
1018
url='https://github.com/mattmakesmaps/pgsql2gist',
1119
license='GNU LESSER GENERAL PUBLIC LICENSE',
20+
keywords='gis gists postgis postgresql geojson',
1221
description='like pgsql2shp, but for github gists',
1322
long_description=open('README.txt').read(),
14-
install_requires=['psycopg2']
23+
install_requires=['psycopg2'],
24+
test_suite='nose.collector',
25+
tests_require=['nose', 'nose-cover3'],
26+
include_package_data=True
1527
)

0 commit comments

Comments
 (0)