[Bug 866265] Review Request: opentrep - C++ API for parsing travel-focused requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=866265



--- Comment #24 from Denis Arnaud <denis.arnaud_fedora@xxxxxxx> ---
(In reply to Michael Schwendt from comment #22)

Many thanks, Michael!


Details:
> pkgconfig deps are automatic for Fedora and EL6

Removed for EL <= 5


Data sub-package:
> %package        data
> Summary:        Referential data for the %{name} library
> Group:          Applications/Databases


> Also just for completeness, "fedora-review -b 866265" reports 
> 
>   BSL (v1.0)
>   ----------
>   opentrep-0.6.0/test/parsers/full_calculator.cpp
>   opentrep-0.6.0/test/parsers/parameter_parser.cpp

Those two source code files have been removed.


> > %package        data
> 
> It's possible to put an own "License: CC-BY-SA" tag into this subpackage.

Done


> /usr/bin/opentrep-config will still conflict, because of the line
> 
>   #libdir=@libdir@

Fixed


A -python sub-package has been added.

> The Provides for the Python module libpyopentrep.so.0.6 are [potentially]
> problematic: 
> https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
> 
>   $ rpm -qp --provides opentrep-0.6.0-1.fc20.x86_64.rpm 
> * libpyopentrep.so.0.6()(64bit)

Fixed thanks to:
%global _privatelibs libpy%{name}[.]so.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$


> > Note that the Python script has got a manual page,
> > but can only be executed from the Python site-packages directory.
> > I do not know how to solve that issue.
> 
> It could be moved into /usr/bin after deleting the sys.path.append lines
> which are commented out anyway. Its Python module is stored in Python search
> path.

If the Xapian indexation has been performed:
$ opentrep-indexer # It may take a few minutes...
$ # To check it:
$ opentrep-searcher -q txl sfo

Then, the following now works:
$ /usr/lib64/python2.7/site-packages/libpyopentrep/pyopentrep


> $ /usr/lib64/python2.7/site-packages/libpyopentrep/pyopentrep
> Traceback (most recent call last):
>   File "/usr/lib64/python2.7/site-packages/libpyopentrep/pyopentrep", line
> 7, in <module>
>     import Travel_pb2
>   File "/usr/lib64/python2.7/site-packages/libpyopentrep/Travel_pb2.py",
> line 4, in <module>
>     from google.protobuf import descriptor as _descriptor
> ImportError: No module named google.protobuf

A Requires: has been added for the -python sub-package.


> Very basic runtime testing _without_ the -data subpackage being installed
> causes the programs to abort:
> 
>   $ opentrep-dbmgr 
>   POR file-path is: /usr/share/opentrep/data/por/ori_por_public.csv
>   Xapian database filepath is: /tmp/opentrep/traveldb
>   Log filename is: opentrep-dbmgr.log
>   Creating the SQLite3 database may take a few minutes on some architectures
> (and a few seconds on fastest ones)...
>   terminate called after throwing an instance of
> 'OPENTREP::SQLDatabaseException'
>   what():  Error when trying to retrieve 0-th row from the SQLite3
> database:Cannot establish connection to the database. unable to open
> database file
>   Aborted (core dumped)

1. A Requires: dependency has been added onto the -data sub-package.
2. For a typical sequence of commands for opentrep-dbmgr:
$ opentrep-dbmgr
opentrep> tutorial

--------------
A few explanations:
* Referential data file is provided as a CSV file
(/usr/share/opentrep/data/por/ori_por_public.csv). That data file must first be
Xapian-indexed by the 'opentrep-indexer' batch program, which stores the Xapian
index database/structure into /tmp/opentrep/xapian_traveldb/. That program does
not use, by default, any relational database.
* The 'opentrep-searcher -q <my_query>' batch program analyses the given query
against the Xapian index, and displays the results. That program does not use,
by default, any relational database. The Python wrapper
(/usr/lib64/python2.7/site-packages/libpyopentrep/pyopentrep) is an alternative
for the same process. For instance:
$ /usr/lib64/python2.7/site-packages/libpyopentrep/pyopentrep -f F txl sfo
gives a result equivalent to:
$ opentrep-searcher -q txl sfo
* The 'opentrep-dbmgr' interactive program allows to create, update and query a
relational database (for now, only SQLite3 and MySQL/MariaDB). When we are only
interested by (IATA, ICAO, FAA) codes, then 'opentrep-dbmgr' is enough (there
is no need for the Xapian index).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]