summaryrefslogtreecommitdiff
path: root/python-execsql.spec
blob: e7f994ce0d37cb07edd059914c93a6e677aa40c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
%global _empty_manifest_terminate_build 0
Name:		python-execsql
Version:	1.115.3
Release:	1
Summary:	Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN.  Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables.  Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates.
License:	GPL
URL:		https://osdn.net/project/execsql/
Source0:	https://mirrors.aliyun.com/pypi/web/packages/0f/eb/65868d3087df1f3a064d447c322c84ad20c385bbb476fecfecaa66405ac2/execsql-1.115.3.tar.gz
BuildArch:	noarch


%description
You can use *execsql* to:
* Import data from text files or spreadsheets into
  a database.
* Copy data between different databases, even databases using different
  types of DBMSs.
* Export tables and views as formatted text, comma-separated values (CSV), tab-separated
  values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5
  tables, unformatted (e.g., binary) data, or several other formats.
* Export data to non-tabular formats using several different
  template processors.
* Display a table or view in a GUI dialog,
  optionally allowing the user to select a data row, enter a data
  value, or respond to a prompt.
* Display a pair of tables or views in a GUI dialog, allowing the user
  to compare data and find rows with matching or non-matching key values.
* Conditionally execute different SQL commands and metacommands based on the DBMS in use,
  the database in use, data values, user input, and other conditions.
* Execute blocks of SQL statements or *execsql* metacommands repeatedly, using
  any of three different looping methods.
* Use simple dynamically-created data entry forms to get user input.
* Write status or informational messages to the console or to a file 
  during the processing of a SQL script. Status messages and data exported in 
  text format can be combined in a single text file. Data tables can be 
  exported in a text format that is compatible with Markdown pipe tables,
  so that script output can be converted into a variety of document formats.
* Write more modular and maintainable SQL code by factoring repeated 
  code out into separate scripts, parameterizing the code using 
  substitution variables, and using the INCLUDE or SCRIPT metacommands 
  to merge the modules into a single stream of commands.
* Merge multiple elements of a workflow—e.g., data loading, summarization, and
  reporting—into a single script for better coupling of related steps and more
  secure maintenance.
* Use *execsql* as a CGI script for a web application that needs to run
  SQL scripts and return database output.
Standard SQL provides no features for interacting with external files or 
with the user, or for controlling the flow of actions to be carried out
based either on data or on user input.  Some DBMSs provide these features,
but capabilities and syntax differ between DBMSs.  *execsql* provides 
these features in a way that operates identically across all supported 
DBMSs on both Linux and Windows.
*execsql* is inherently a command-line program that can operate in a completely 
non-interactive mode (except for password prompts). Therefore, it is suitable 
for incorporation into a toolchain controlled by a shell script (on Linux), 
batch file (on Windows), or other system-level scripting application. When 
used in this mode, the only interactive elements will be password prompts.
However, several metacommands generate interactive prompts and data
displays, so *execsql* scripts can be written to provide some user interactivity.
In addition, *execsql* automatically maintains a log that documents key 
information about each run of the program, including the databases that are 
used, the scripts that are run, and the user's choices in response to 
interactive prompts. Together, the script and the log provide documentation 
of all actions carried out that may have altered data.
The documentation includes 30 examples showing the use of
*execsql*'s metacommands, in both simple and complex scripts.

%package -n python3-execsql
Summary:	Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN.  Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables.  Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates.
Provides:	python-execsql
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-execsql
You can use *execsql* to:
* Import data from text files or spreadsheets into
  a database.
* Copy data between different databases, even databases using different
  types of DBMSs.
* Export tables and views as formatted text, comma-separated values (CSV), tab-separated
  values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5
  tables, unformatted (e.g., binary) data, or several other formats.
* Export data to non-tabular formats using several different
  template processors.
* Display a table or view in a GUI dialog,
  optionally allowing the user to select a data row, enter a data
  value, or respond to a prompt.
* Display a pair of tables or views in a GUI dialog, allowing the user
  to compare data and find rows with matching or non-matching key values.
* Conditionally execute different SQL commands and metacommands based on the DBMS in use,
  the database in use, data values, user input, and other conditions.
* Execute blocks of SQL statements or *execsql* metacommands repeatedly, using
  any of three different looping methods.
* Use simple dynamically-created data entry forms to get user input.
* Write status or informational messages to the console or to a file 
  during the processing of a SQL script. Status messages and data exported in 
  text format can be combined in a single text file. Data tables can be 
  exported in a text format that is compatible with Markdown pipe tables,
  so that script output can be converted into a variety of document formats.
* Write more modular and maintainable SQL code by factoring repeated 
  code out into separate scripts, parameterizing the code using 
  substitution variables, and using the INCLUDE or SCRIPT metacommands 
  to merge the modules into a single stream of commands.
* Merge multiple elements of a workflow—e.g., data loading, summarization, and
  reporting—into a single script for better coupling of related steps and more
  secure maintenance.
* Use *execsql* as a CGI script for a web application that needs to run
  SQL scripts and return database output.
Standard SQL provides no features for interacting with external files or 
with the user, or for controlling the flow of actions to be carried out
based either on data or on user input.  Some DBMSs provide these features,
but capabilities and syntax differ between DBMSs.  *execsql* provides 
these features in a way that operates identically across all supported 
DBMSs on both Linux and Windows.
*execsql* is inherently a command-line program that can operate in a completely 
non-interactive mode (except for password prompts). Therefore, it is suitable 
for incorporation into a toolchain controlled by a shell script (on Linux), 
batch file (on Windows), or other system-level scripting application. When 
used in this mode, the only interactive elements will be password prompts.
However, several metacommands generate interactive prompts and data
displays, so *execsql* scripts can be written to provide some user interactivity.
In addition, *execsql* automatically maintains a log that documents key 
information about each run of the program, including the databases that are 
used, the scripts that are run, and the user's choices in response to 
interactive prompts. Together, the script and the log provide documentation 
of all actions carried out that may have altered data.
The documentation includes 30 examples showing the use of
*execsql*'s metacommands, in both simple and complex scripts.

%package help
Summary:	Development documents and examples for execsql
Provides:	python3-execsql-doc
%description help
You can use *execsql* to:
* Import data from text files or spreadsheets into
  a database.
* Copy data between different databases, even databases using different
  types of DBMSs.
* Export tables and views as formatted text, comma-separated values (CSV), tab-separated
  values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5
  tables, unformatted (e.g., binary) data, or several other formats.
* Export data to non-tabular formats using several different
  template processors.
* Display a table or view in a GUI dialog,
  optionally allowing the user to select a data row, enter a data
  value, or respond to a prompt.
* Display a pair of tables or views in a GUI dialog, allowing the user
  to compare data and find rows with matching or non-matching key values.
* Conditionally execute different SQL commands and metacommands based on the DBMS in use,
  the database in use, data values, user input, and other conditions.
* Execute blocks of SQL statements or *execsql* metacommands repeatedly, using
  any of three different looping methods.
* Use simple dynamically-created data entry forms to get user input.
* Write status or informational messages to the console or to a file 
  during the processing of a SQL script. Status messages and data exported in 
  text format can be combined in a single text file. Data tables can be 
  exported in a text format that is compatible with Markdown pipe tables,
  so that script output can be converted into a variety of document formats.
* Write more modular and maintainable SQL code by factoring repeated 
  code out into separate scripts, parameterizing the code using 
  substitution variables, and using the INCLUDE or SCRIPT metacommands 
  to merge the modules into a single stream of commands.
* Merge multiple elements of a workflow—e.g., data loading, summarization, and
  reporting—into a single script for better coupling of related steps and more
  secure maintenance.
* Use *execsql* as a CGI script for a web application that needs to run
  SQL scripts and return database output.
Standard SQL provides no features for interacting with external files or 
with the user, or for controlling the flow of actions to be carried out
based either on data or on user input.  Some DBMSs provide these features,
but capabilities and syntax differ between DBMSs.  *execsql* provides 
these features in a way that operates identically across all supported 
DBMSs on both Linux and Windows.
*execsql* is inherently a command-line program that can operate in a completely 
non-interactive mode (except for password prompts). Therefore, it is suitable 
for incorporation into a toolchain controlled by a shell script (on Linux), 
batch file (on Windows), or other system-level scripting application. When 
used in this mode, the only interactive elements will be password prompts.
However, several metacommands generate interactive prompts and data
displays, so *execsql* scripts can be written to provide some user interactivity.
In addition, *execsql* automatically maintains a log that documents key 
information about each run of the program, including the databases that are 
used, the scripts that are run, and the user's choices in response to 
interactive prompts. Together, the script and the log provide documentation 
of all actions carried out that may have altered data.
The documentation includes 30 examples showing the use of
*execsql*'s metacommands, in both simple and complex scripts.

%prep
%autosetup -n execsql-1.115.3

%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-execsql -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 1.115.3-1
- Package Spec generated