summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 02:28:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 02:28:17 +0000
commit438cf1c00e9f86fc21ab1ab8638be23f5773e6ac (patch)
tree530cb6afe2c9d6f215a012e170f403c74772c371
parent5ccd334c5b13644a47fb7e41c5a799907c3ab388 (diff)
automatic import of python-cql
-rw-r--r--.gitignore1
-rw-r--r--python-cql.spec153
-rw-r--r--sources1
3 files changed, 155 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..622d35b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cql-1.4.0.tar.gz
diff --git a/python-cql.spec b/python-cql.spec
new file mode 100644
index 0000000..9754cdf
--- /dev/null
+++ b/python-cql.spec
@@ -0,0 +1,153 @@
+%global _empty_manifest_terminate_build 0
+Name: python-cql
+Version: 1.4.0
+Release: 1
+Summary: Cassandra Query Language driver
+License: UNKNOWN
+URL: http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0b/15/523f6008d32f05dd3c6a2e7c2f21505f0a785b6dc8949cad325306858afc/cql-1.4.0.tar.gz
+BuildArch: noarch
+
+
+%description
+A Python driver for CQL that adheres to py-dbapi v2
+ (PEP249, Python Database API Specification v2.0: http://www.python.org/dev/peps/pep-0249/).
+
+Standard use:
+ >> import cql
+ >> con = cql.connect(host, port, keyspace)
+ >> cursor = con.cursor()
+ >> cursor.execute("CQL QUERY", dict(kw='Foo', kw2='Bar, etc...))
+
+ - cursor.description # None initially, list of N tuples that represent
+ the N columns in a row after an execute. Only
+ contains type and name info, not values.
+ - cursor.rowcount # -1 initially, N after an execute
+ - cursor.arraysize # variable size of a fetchmany call
+ - cursor.fetchone() # returns a single row
+ - cursor.fetchmany() # returns self.arraysize # of rows
+ - cursor.fetchall() # returns all rows, don't do this.
+
+ >> cursor.execute("ANOTHER QUERY", **more_kwargs)
+ >> for row in cursor: # Iteration is equivalent to lots of fetchone() calls
+ >> doRowMagic(row)
+
+ >> cursor.close()
+ >> con.close()
+
+Query substitution:
+ - Use named parameters and a dictionary of names and values.
+ e.g. execute("SELECT * FROM CF WHERE name=:name", {"name": "Foo"})
+
+%package -n python3-cql
+Summary: Cassandra Query Language driver
+Provides: python-cql
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-cql
+A Python driver for CQL that adheres to py-dbapi v2
+ (PEP249, Python Database API Specification v2.0: http://www.python.org/dev/peps/pep-0249/).
+
+Standard use:
+ >> import cql
+ >> con = cql.connect(host, port, keyspace)
+ >> cursor = con.cursor()
+ >> cursor.execute("CQL QUERY", dict(kw='Foo', kw2='Bar, etc...))
+
+ - cursor.description # None initially, list of N tuples that represent
+ the N columns in a row after an execute. Only
+ contains type and name info, not values.
+ - cursor.rowcount # -1 initially, N after an execute
+ - cursor.arraysize # variable size of a fetchmany call
+ - cursor.fetchone() # returns a single row
+ - cursor.fetchmany() # returns self.arraysize # of rows
+ - cursor.fetchall() # returns all rows, don't do this.
+
+ >> cursor.execute("ANOTHER QUERY", **more_kwargs)
+ >> for row in cursor: # Iteration is equivalent to lots of fetchone() calls
+ >> doRowMagic(row)
+
+ >> cursor.close()
+ >> con.close()
+
+Query substitution:
+ - Use named parameters and a dictionary of names and values.
+ e.g. execute("SELECT * FROM CF WHERE name=:name", {"name": "Foo"})
+
+%package help
+Summary: Development documents and examples for cql
+Provides: python3-cql-doc
+%description help
+A Python driver for CQL that adheres to py-dbapi v2
+ (PEP249, Python Database API Specification v2.0: http://www.python.org/dev/peps/pep-0249/).
+
+Standard use:
+ >> import cql
+ >> con = cql.connect(host, port, keyspace)
+ >> cursor = con.cursor()
+ >> cursor.execute("CQL QUERY", dict(kw='Foo', kw2='Bar, etc...))
+
+ - cursor.description # None initially, list of N tuples that represent
+ the N columns in a row after an execute. Only
+ contains type and name info, not values.
+ - cursor.rowcount # -1 initially, N after an execute
+ - cursor.arraysize # variable size of a fetchmany call
+ - cursor.fetchone() # returns a single row
+ - cursor.fetchmany() # returns self.arraysize # of rows
+ - cursor.fetchall() # returns all rows, don't do this.
+
+ >> cursor.execute("ANOTHER QUERY", **more_kwargs)
+ >> for row in cursor: # Iteration is equivalent to lots of fetchone() calls
+ >> doRowMagic(row)
+
+ >> cursor.close()
+ >> con.close()
+
+Query substitution:
+ - Use named parameters and a dictionary of names and values.
+ e.g. execute("SELECT * FROM CF WHERE name=:name", {"name": "Foo"})
+
+%prep
+%autosetup -n cql-1.4.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-cql -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.4.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..5278a68
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ee3f4c5178335cb65bbbd55bb808e1ae cql-1.4.0.tar.gz