diff --git a/README b/README index 35e42f4..a11ebb5 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -pg-python is a Python procedural language extension for PostgreSQL. +pg-python is a PostgreSQL procedural language extension embedding Python 3. If the environment is configured to meet pg-python's expectations, the following should work:: @@ -8,7 +8,7 @@ should work:: sudo make install psql -f src/install.sql -It assumes the *target* pg_config and python3 executables are in $PATH. +It assumes the *target* `pg_config` and `python3` executables are in $PATH. See src/documentation/admin.txt for detailed instructions on compilation and database installation. diff --git a/build/tools/pgxn.py b/build/tools/pgxn.py new file mode 100644 index 0000000..f26ac70 --- /dev/null +++ b/build/tools/pgxn.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +# Render PGXN META.json file from src/project.py. +import sys +import os +sys.path.insert(0, os.path.realpath('./src')) +import project +import json + +data = { + "name": project.name, + "abstract": project.abstract, + "description": "", + "version": project.version, + "maintainer": [project.author], + "license": "bsd", + "provides": { + "python": { + "name": "python", + "abstract": "procedural language extension", + "file": "src/install_inline.sql", + "version": project.version, + } + }, + "resources": { + "bugtracker": { + "web": project.bugtracker, + }, + "repository": { + "url": "git://github.com/jwp/pg-python.git", + "web": "http://github.com/jwp/pg-python/", + "type": "git", + } + }, + "generated_by": "James William Pye", + "tags": [ + "python", "pl", "procedural language", "awesome" + ], + "meta-spec": {"version": "1.0.0", "url": "http://pgxn.org/meta/spec.txt"}, +} + +json.dump(data, sys.stdout) diff --git a/src/documentation/intro.txt b/src/documentation/intro.txt index 38089ce..2067fa0 100644 --- a/src/documentation/intro.txt +++ b/src/documentation/intro.txt @@ -2,7 +2,7 @@ pg-python ^^^^^^^^^ -pg-python is a Python 3 procedural language extension for PostgreSQL. +pg-python is a PostgreSQL procedural language extension embedding Python 3. Procedural language extensions are dynamically loaded libraries that can enable the use of a language within PostgreSQL, normally by creating SQL FUNCTIONs. diff --git a/src/project.py b/src/project.py index 0ed1597..feb26ac 100644 --- a/src/project.py +++ b/src/project.py @@ -4,6 +4,10 @@ name = 'pg-python' identity = 'http://python.projects.postgresql.org/backend' author = 'James William Pye ' +abstract = 'PostgreSQL procedural language extension embedding Python 3' +license = 'bsd' + +bugtracker = "http://github.com/jwp/pg-python/issues/" systems = { 'pg_8_3': 'PostgreSQL 8.3', diff --git a/src/project.py.cfrag b/src/project.py.cfrag index 5028690..8ec6a7f 100644 --- a/src/project.py.cfrag +++ b/src/project.py.cfrag @@ -1 +1 @@ -35,35,10,35,32,112,114,111,106,101,99,116,46,112,121,32,45,32,112,114,111,106,101,99,116,32,105,110,102,111,114,109,97,116,105,111,110,10,35,35,10,110,97,109,101,32,61,32,39,112,103,45,112,121,116,104,111,110,39,10,105,100,101,110,116,105,116,121,32,61,32,39,104,116,116,112,58,47,47,112,121,116,104,111,110,46,112,114,111,106,101,99,116,115,46,112,111,115,116,103,114,101,115,113,108,46,111,114,103,47,98,97,99,107,101,110,100,39,10,97,117,116,104,111,114,32,61,32,39,74,97,109,101,115,32,87,105,108,108,105,97,109,32,80,121,101,32,60,120,64,106,119,112,46,110,97,109,101,62,39,10,10,115,121,115,116,101,109,115,32,61,32,123,10,9,39,112,103,95,56,95,51,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,56,46,51,39,44,10,9,39,112,103,95,56,95,52,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,56,46,52,39,44,10,9,39,112,103,95,57,95,48,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,57,46,48,39,44,10,9,39,112,103,95,57,95,49,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,57,46,49,39,44,10,125,10,115,121,115,116,101,109,95,97,108,105,97,115,101,115,32,61,32,123,10,9,39,112,103,95,56,95,53,39,32,58,32,39,112,103,95,57,95,48,39,10,125,10,100,101,102,97,117,108,116,95,115,121,115,116,101,109,32,61,32,39,112,103,95,57,95,49,39,10,10,108,97,110,103,117,97,103,101,115,32,61,32,123,10,9,39,112,121,95,51,95,49,39,58,32,39,80,121,116,104,111,110,32,51,46,49,39,44,10,9,39,112,121,95,51,95,50,39,58,32,39,80,121,116,104,111,110,32,51,46,50,39,44,10,125,10,10,100,97,116,101,32,61,32,78,111,110,101,10,116,97,103,115,32,61,32,115,101,116,40,40,39,98,117,103,115,39,44,41,41,10,118,101,114,115,105,111,110,95,105,110,102,111,32,61,32,40,49,44,32,48,44,32,50,41,10,118,101,114,115,105,111,110,32,61,32,39,46,39,46,106,111,105,110,40,109,97,112,40,115,116,114,44,32,118,101,114,115,105,111,110,95,105,110,102,111,41,41,32,43,32,40,100,97,116,101,32,105,115,32,78,111,110,101,32,97,110,100,32,39,100,101,118,39,32,111,114,32,39,39,41,10,0 +35,35,10,35,32,112,114,111,106,101,99,116,46,112,121,32,45,32,112,114,111,106,101,99,116,32,105,110,102,111,114,109,97,116,105,111,110,10,35,35,10,110,97,109,101,32,61,32,39,112,103,45,112,121,116,104,111,110,39,10,105,100,101,110,116,105,116,121,32,61,32,39,104,116,116,112,58,47,47,112,121,116,104,111,110,46,112,114,111,106,101,99,116,115,46,112,111,115,116,103,114,101,115,113,108,46,111,114,103,47,98,97,99,107,101,110,100,39,10,97,117,116,104,111,114,32,61,32,39,74,97,109,101,115,32,87,105,108,108,105,97,109,32,80,121,101,32,60,120,64,106,119,112,46,110,97,109,101,62,39,10,97,98,115,116,114,97,99,116,32,61,32,39,80,111,115,116,103,114,101,83,81,76,32,112,114,111,99,101,100,117,114,97,108,32,108,97,110,103,117,97,103,101,32,101,120,116,101,110,115,105,111,110,32,101,109,98,101,100,100,105,110,103,32,80,121,116,104,111,110,32,51,39,10,108,105,99,101,110,115,101,32,61,32,39,98,115,100,39,10,10,98,117,103,116,114,97,99,107,101,114,32,61,32,34,104,116,116,112,58,47,47,103,105,116,104,117,98,46,99,111,109,47,106,119,112,47,112,103,45,112,121,116,104,111,110,47,105,115,115,117,101,115,47,34,10,10,115,121,115,116,101,109,115,32,61,32,123,10,9,39,112,103,95,56,95,51,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,56,46,51,39,44,10,9,39,112,103,95,56,95,52,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,56,46,52,39,44,10,9,39,112,103,95,57,95,48,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,57,46,48,39,44,10,9,39,112,103,95,57,95,49,39,58,32,39,80,111,115,116,103,114,101,83,81,76,32,57,46,49,39,44,10,125,10,115,121,115,116,101,109,95,97,108,105,97,115,101,115,32,61,32,123,10,9,39,112,103,95,56,95,53,39,32,58,32,39,112,103,95,57,95,48,39,10,125,10,100,101,102,97,117,108,116,95,115,121,115,116,101,109,32,61,32,39,112,103,95,57,95,49,39,10,10,108,97,110,103,117,97,103,101,115,32,61,32,123,10,9,39,112,121,95,51,95,49,39,58,32,39,80,121,116,104,111,110,32,51,46,49,39,44,10,9,39,112,121,95,51,95,50,39,58,32,39,80,121,116,104,111,110,32,51,46,50,39,44,10,125,10,10,100,97,116,101,32,61,32,78,111,110,101,10,116,97,103,115,32,61,32,115,101,116,40,40,39,98,117,103,115,39,44,41,41,10,118,101,114,115,105,111,110,95,105,110,102,111,32,61,32,40,49,44,32,48,44,32,50,41,10,118,101,114,115,105,111,110,32,61,32,39,46,39,46,106,111,105,110,40,109,97,112,40,115,116,114,44,32,118,101,114,115,105,111,110,95,105,110,102,111,41,41,32,43,32,40,100,97,116,101,32,105,115,32,78,111,110,101,32,97,110,100,32,39,100,101,118,39,32,111,114,32,39,39,41,10,0