[python-py2neo] Initial import

Jamie Nguyen jamielinux at fedoraproject.org
Thu Jun 20 18:14:24 UTC 2013


commit 00bd991492b299ba9cc4ffccbc42e2cbe7eabc30
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Thu Jun 20 19:14:11 2013 +0100

    Initial import

 .gitignore         |    1 +
 cypher.1           |   27 ++++++++++
 geoff.1            |   27 ++++++++++
 neotool.1          |   57 ++++++++++++++++++++++
 python-py2neo.spec |  134 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    1 +
 6 files changed, 247 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b9d93a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/py2neo-1.5.tar.gz
diff --git a/cypher.1 b/cypher.1
new file mode 100644
index 0000000..b81944b
--- /dev/null
+++ b/cypher.1
@@ -0,0 +1,27 @@
+.TH CYPHER "1" "June 2013" "cypher: 1.5" "User Commands"
+.SH NAME
+cypher \- Execute Cypher queries against a Neo4j database server
+.SH SYNOPSIS
+Usage: cypher [\-h] [\-H host] [\-P port] [\-D path] [\-f format] [query]
+.SH DESCRIPTION
+Execute Cypher queries against a Neo4j database server and output the results.
+.SH ARGUMENTS
+.TP
+\fBquery\fR
+the Cypher query to execute (if omitted, will read from standard input)
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-H\fR host, \fB\-\-host\fR host
+Neo4j server host name (default "localhost"')
+.TP
+\fB\-P\fR port, \fB\-\-port\fR port
+Neo4j server port (default 7474)
+.TP
+\fB\-D\fR path, \fB\-\-database\-path\fR path
+path of graph database (default "/db/data/")
+.TP
+\fB\-f\fR format, \fB\-\-format\fR format
+output file format (default "text")
diff --git a/geoff.1 b/geoff.1
new file mode 100644
index 0000000..7d843d3
--- /dev/null
+++ b/geoff.1
@@ -0,0 +1,27 @@
+.TH GEOFF "1" "June 2013" "geoff: 1.5" "User Commands"
+.SH NAME
+geoff \- Pass Geoff data to a Neo4j database server
+.SH SYNOPSIS
+Usage: geoff [\-h] [\-H host] [\-P port] [\-D path] operation [file]
+.SH DESCRIPTION
+Pass Geoff data to a Neo4j database server for insert, merge or delete.
+.SH ARGUMENTS
+.TP
+\fBoperation\fR
+Geoff operation (insert|merge)
+.TP
+\fBfile\fR
+file from which to load Geoff data
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-H\fR host, \fB\-\-host\fR host
+Neo4j server host name
+.TP
+\fB\-P\fR port, \fB\-\-port\fR port
+Neo4j server port
+.TP
+\fB\-D\fR path, \fB\-\-database\-path\fR path
+path of graph database (e.g. /db/data/)
diff --git a/neotool.1 b/neotool.1
new file mode 100644
index 0000000..99ef2fd
--- /dev/null
+++ b/neotool.1
@@ -0,0 +1,57 @@
+.TH NEOTOOL "1" "June 2013" "neotool: 1.5" "User Commands"
+.SH NAME
+neotool \- tool for interacting with a Neo4j database server
+.SH SYNOPSIS
+Usage: neotool <options> <command> <args>
+.SH DESCRIPTION
+Tool for interacting with a Neo4j database server
+.SH OPTIONS
+.TP
+\fB\-h\fR/\fB\-\-help\fR [<command>]
+Show tool usage
+.TP
+\fB\-v\fR/\fB\-\-version\fR
+Show tool version
+.TP
+\fB\-c\fR/\fB\-\-copyright\fR
+Show tool copyright
+.TP
+\fB\-S\fR/\fB\-\-scheme\fR <scheme>
+Set database scheme
+.TP
+\fB\-H\fR/\fB\-\-host\fR <host>
+Set database host
+.TP
+\fB\-P\fR/\fB\-\-port\fR <port>
+Set database port
+.SH COMMANDS
+.TP
+\fBclear\fR
+Clear all nodes and relationships
+.TP
+\fBcypher\fR <query>
+Execute Cypher query and output as text
+.TP
+\fBcypher\-csv\fR <query>
+Execute Cypher query and output as CSV
+.TP
+\fBcypher\-geoff\fR <query>
+Execute Cypher query and output as Geoff
+.TP
+\fBcypher\-json\fR <query>
+Execute Cypher query and output as JSON
+.TP
+\fBcypher\-tsv\fR <query>
+Execute Cypher query and output as tab separated values
+.TP
+\fBgeoff\-insert\fR <file>
+Insert Geoff data
+.TP
+\fBgeoff\-merge\fR <file>
+Merge Geoff data
+.TP
+\fBxml\-insert\fR <file>
+Insert XML data
+.TP
+\fBxml\-merge\fR <file>
+Merge XML data
diff --git a/python-py2neo.spec b/python-py2neo.spec
new file mode 100644
index 0000000..cc299dc
--- /dev/null
+++ b/python-py2neo.spec
@@ -0,0 +1,134 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+Name:           python-py2neo
+Version:        1.5
+Release:        2%{?dist}
+Summary:        A simple Python library that provides access to Neo4j
+
+Group:          Development/Languages
+License:        ASL 2.0
+URL:            http://py2neo.org/
+Source0:        https://pypi.python.org/packages/source/p/py2neo/py2neo-%{version}.tar.gz
+# Man pages based on output from help2man.
+Source10:       cypher.1
+Source11:       geoff.1
+Source12:       neotool.1
+
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+%description
+Py2neo is a simple and pragmatic Python library that provides access to
+the popular graph database Neo4j via its RESTful web service interface.
+
+%if 0%{?with_python3}
+%package     -n python3-py2neo
+Summary:        A simple Python library that provides access to Neo4j
+Group:          Development/Languages
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+
+%description -n python3-py2neo
+Py2neo is a simple and pragmatic Python library that provides access to
+the popular graph database Neo4j via its RESTful web service interface.
+%endif
+
+
+%prep
+%setup -q -n py2neo-%{version}
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+
+%build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+%{__python} setup.py build
+
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+# Fix non-executable-script warnings
+chmod -x %{buildroot}%{python3_sitelib}/py2neo/*.py
+for lib in %{buildroot}%{python3_sitelib}/py2neo/*.py; do
+    sed '1{\@^#!/usr/bin/env python at d}' ${lib} > ${lib}.new
+    touch -r ${lib} ${lib}.new
+    mv ${lib}.new ${lib}
+done
+# Rename python 3 scripts
+for i in %{buildroot}%{_bindir}/{cypher,geoff,neotool}; do
+    mv "${i}" "${i}-python3"
+done
+# Man pages
+install -p -D -m0644 %{SOURCE10} %{buildroot}%{_mandir}/man1/cypher-python3.1
+install -p -D -m0644 %{SOURCE11} %{buildroot}%{_mandir}/man1/geoff-python3.1
+install -p -D -m0644 %{SOURCE12} %{buildroot}%{_mandir}/man1/neotool-python3.1
+popd
+%endif
+
+%{__python} setup.py install --skip-build --root %{buildroot}
+# Fix non-executable-script warnings
+chmod -x %{buildroot}%{python_sitelib}/py2neo/*.py
+for lib in %{buildroot}%{python_sitelib}/py2neo/*.py; do
+    sed '1{\@^#!/usr/bin/env python at d}' ${lib} > ${lib}.new
+    touch -r ${lib} ${lib}.new
+    mv ${lib}.new ${lib}
+done
+# Man pages
+install -p -D -m0644 %{SOURCE10} %{buildroot}%{_mandir}/man1/cypher.1
+install -p -D -m0644 %{SOURCE11} %{buildroot}%{_mandir}/man1/geoff.1
+install -p -D -m0644 %{SOURCE12} %{buildroot}%{_mandir}/man1/neotool.1
+
+
+%files
+%doc LICENSE NOTICE README
+%{python_sitelib}/*egg-info
+%{python_sitelib}/py2neo
+%{_bindir}/cypher
+%{_bindir}/geoff
+%{_bindir}/neotool
+%{_mandir}/man1/cypher.1*
+%{_mandir}/man1/geoff.1*
+%{_mandir}/man1/neotool.1*
+
+%if 0%{?with_python3}
+%files -n python3-py2neo
+%doc LICENSE NOTICE README
+%{python3_sitelib}/*egg-info
+%{python3_sitelib}/py2neo
+%{_bindir}/cypher-python3
+%{_bindir}/geoff-python3
+%{_bindir}/neotool-python3
+%{_mandir}/man1/cypher-python3.1*
+%{_mandir}/man1/geoff-python3.1*
+%{_mandir}/man1/neotool-python3.1*
+%endif
+
+
+%changelog
+* Thu Jun 20 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.5-2
+- make python3 subpackage standalone, renaming scripts to foo-python3
+- remove executable bits and extraneous shebangs
+
+* Wed Jun 19 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.5-1
+- update to upstream release 1.5
+- add missing BR
+- remove redundant build variables
+- add custom man pages (generated with help2man)
+
+* Sat Mar 09 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.4.6-1
+- initial package
diff --git a/sources b/sources
index e69de29..3180bdb 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+20eecf503af5780582a37ac32c66d348  py2neo-1.5.tar.gz


More information about the scm-commits mailing list