Skip to content

Commit 3b72d63

Browse files
author
James William Pye
committed
Preparations for PGXN distribution.
Add JSON generator script, primarily seeded by src/project.py. Adjust the documentation a little.
1 parent 261d106 commit 3b72d63

File tree

5 files changed

+49
-4
lines changed

5 files changed

+49
-4
lines changed

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pg-python is a Python procedural language extension for PostgreSQL.
1+
pg-python is a PostgreSQL procedural language extension embedding Python 3.
22

33
If the environment is configured to meet pg-python's expectations, the following
44
should work::
@@ -8,7 +8,7 @@ should work::
88
sudo make install
99
psql -f src/install.sql
1010

11-
It assumes the *target* pg_config and python3 executables are in $PATH.
11+
It assumes the *target* `pg_config` and `python3` executables are in $PATH.
1212

1313
See src/documentation/admin.txt for detailed instructions on
1414
compilation and database installation.

build/tools/pgxn.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env python3
2+
# Render PGXN META.json file from src/project.py.
3+
import sys
4+
import os
5+
sys.path.insert(0, os.path.realpath('./src'))
6+
import project
7+
import json
8+
9+
data = {
10+
"name": project.name,
11+
"abstract": project.abstract,
12+
"description": "",
13+
"version": project.version,
14+
"maintainer": [project.author],
15+
"license": "bsd",
16+
"provides": {
17+
"python": {
18+
"name": "python",
19+
"abstract": "procedural language extension",
20+
"file": "src/install_inline.sql",
21+
"version": project.version,
22+
}
23+
},
24+
"resources": {
25+
"bugtracker": {
26+
"web": project.bugtracker,
27+
},
28+
"repository": {
29+
"url": "git://github.com/jwp/pg-python.git",
30+
"web": "http://github.com/jwp/pg-python/",
31+
"type": "git",
32+
}
33+
},
34+
"generated_by": "James William Pye",
35+
"tags": [
36+
"python", "pl", "procedural language", "awesome"
37+
],
38+
"meta-spec": {"version": "1.0.0", "url": "http://pgxn.org/meta/spec.txt"},
39+
}
40+
41+
json.dump(data, sys.stdout)

src/documentation/intro.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pg-python
33
^^^^^^^^^
44

5-
pg-python is a Python 3 procedural language extension for PostgreSQL.
5+
pg-python is a PostgreSQL procedural language extension embedding Python 3.
66

77
Procedural language extensions are dynamically loaded libraries that can enable
88
the use of a language within PostgreSQL, normally by creating SQL FUNCTIONs.

src/project.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
name = 'pg-python'
55
identity = 'http://python.projects.postgresql.org/backend'
66
author = 'James William Pye <[email protected]>'
7+
abstract = 'PostgreSQL procedural language extension embedding Python 3'
8+
license = 'bsd'
9+
10+
bugtracker = "http://github.com/jwp/pg-python/issues/"
711

812
systems = {
913
'pg_8_3': 'PostgreSQL 8.3',

src/project.py.cfrag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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
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,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

0 commit comments

Comments
 (0)