giacpy 0.6.4

Répondre
frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

giacpy 0.6.4

Message par frederic han » mer. janv. 10, 2018 2:23 pm

btw,
I have updated giacpy on Pypi with version 0.6.4.
(mostly a keyword update, fix for srand ...)

sagitter
Messages : 21
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: giacpy 0.6.4

Message par sagitter » dim. janv. 14, 2018 7:26 pm

GPL-2 file is not in the source archive.
Please, add a license file.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter
GPG Key: 0x5E212EE1D35568BE
Check on https://keys.fedoraproject.org/

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » lun. janv. 15, 2018 10:52 am

OK so I have added it in giacpy-0.6.5 on Pypi.

sagitter
Messages : 21
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: giacpy 0.6.4

Message par sagitter » mer. janv. 17, 2018 8:18 am

Have sense packaging the files giacpymisc.h and giacpy.cpp?
They are automatically installed by setup.py script.

Thank you.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter
GPG Key: 0x5E212EE1D35568BE
Check on https://keys.fedoraproject.org/

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » mer. janv. 17, 2018 2:58 pm

Indeed the .cpp files are not needed, they can be deleted.

but .pxi, .h, .pxd may be needed by a cython user. They can be put in a devel package.

You may also delete the .pyx files or put them in the -devel package according to your policy. (it would be hard to use giacpy in cython without reading the .pyx files.)

For instance if I look to python2-cysignals and python2-cysignals-devel it should have a similar packaging:

Code : Tout sélectionner

[fred@host-43-59 tutu]$ rpm -ql python2-cysignals
/usr/bin/cysignals-CSI-2
/usr/bin/cysignals-CSI-helper.py
/usr/lib/.build-id
/usr/lib/.build-id/5e
/usr/lib/.build-id/5e/cf3da0964e8fdd37933c5bbfa218bfa8f4da36
/usr/lib/.build-id/69
/usr/lib/.build-id/69/c84279f0dcea352951a99e2f4dc6be8c820d1f
/usr/lib/.build-id/6e
/usr/lib/.build-id/6e/da466b04b4f6996bf7fdb1d14b6e941c90c805
/usr/lib/.build-id/70
/usr/lib/.build-id/70/0289dc21f73b53ad44f740df90ebf83d36626c
/usr/lib64/python2.7/site-packages/cysignals
/usr/lib64/python2.7/site-packages/cysignals-1.3.2-py2.7.egg-info
/usr/lib64/python2.7/site-packages/cysignals/__init__.py
/usr/lib64/python2.7/site-packages/cysignals/__init__.pyc
/usr/lib64/python2.7/site-packages/cysignals/__init__.pyo
/usr/lib64/python2.7/site-packages/cysignals/alarm.so
/usr/lib64/python2.7/site-packages/cysignals/pselect.so
/usr/lib64/python2.7/site-packages/cysignals/signals.so
/usr/lib64/python2.7/site-packages/cysignals/tests.so
/usr/share/doc/python2-cysignals
/usr/share/doc/python2-cysignals/PKG-INFO
/usr/share/doc/python2-cysignals/README.rst
/usr/share/licenses/python2-cysignals
/usr/share/licenses/python2-cysignals/LICENSE
[fred@host-43-59 tutu]$ rpm -ql python2-cysignals-devel
/usr/lib64/python2.7/site-packages/cysignals/__init__.pxd
/usr/lib64/python2.7/site-packages/cysignals/debug.h
/usr/lib64/python2.7/site-packages/cysignals/macros.h
/usr/lib64/python2.7/site-packages/cysignals/memory.pxd
/usr/lib64/python2.7/site-packages/cysignals/memory.pxi
/usr/lib64/python2.7/site-packages/cysignals/pxi.h
/usr/lib64/python2.7/site-packages/cysignals/signals.h
/usr/lib64/python2.7/site-packages/cysignals/signals.pxd
/usr/lib64/python2.7/site-packages/cysignals/signals.pxi
/usr/lib64/python2.7/site-packages/cysignals/signals_api.h
/usr/lib64/python2.7/site-packages/cysignals/struct_signals.h
Moreover, if you build with --enable-qcas, you can put giacpy2qcas* files in another package say python2-giacpy-qcas depending on python2-giacpy. Like this the gui deps will be optionnal

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » mer. janv. 17, 2018 3:27 pm

NB: with your qcas-0.5.3-3 I was not able to built giacpy with --enable-qcas because some .h files didn't go in the gui subdir. moreover it uses the
ui_MainWindow.h file that is created by qmake-qt5 at build time, so I was able to built giacpy with python setup.py --enable-qcas build with:

Code : Tout sélectionner

mkdir -p %{buildroot}%{_includedir}/lib%{name}
install -pm 644 ui_MainWindow.h \
 ../qt/MainWindow.h \
 ../qt/output.h \
 ../qt/CasManager.h \
 ../qt/geometry.h \
 ../qt/config.h \
 ../qt/giacpy.h \
 ../qt/sizeof_void_p.h %{buildroot}%{_includedir}/lib%{name}/
mkdir -p %{buildroot}%{_includedir}/lib%{name}/gui
install -pm 644 ../qt/gui/WizardMatrix.h \
 ../qt/gui/WizardEquation.h \
 ../qt/gui/WizardCatalog.h \
 ../qt/gui/WizardAlgo.h \
 ../qt/gui/spreadsheet.h \
 ../qt/gui/qtmmlwidget.h \
 ../qt/gui/FormalSheet.h \
 ../qt/gui/FormalLineWidgets.h \
 ../qt/gui/FormalLine.h \
 ../qt/gui/CentralTabWidget.h \
 ../qt/gui/prefdialog.h \
 ../qt/gui/plotfunctiondialog.h  %{buildroot}%{_includedir}/lib%{name}/gui/

NB2: libtommath-devel is not used by qcas nor libqcas

sagitter
Messages : 21
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: giacpy 0.6.4

Message par sagitter » mer. janv. 17, 2018 10:07 pm

frederic han a écrit :NB: with your qcas-0.5.3-3 I was not able to built giacpy with --enable-qcas because some .h files didn't go in the gui subdir. moreover it uses the
ui_MainWindow.h file that is created by qmake-qt5 at build time, so I was able to built giacpy with python setup.py --enable-qcas build with:

Code : Tout sélectionner

mkdir -p %{buildroot}%{_includedir}/lib%{name}
install -pm 644 ui_MainWindow.h \
 ../qt/MainWindow.h \
 ../qt/output.h \
 ../qt/CasManager.h \
 ../qt/geometry.h \
 ../qt/config.h \
 ../qt/giacpy.h \
 ../qt/sizeof_void_p.h %{buildroot}%{_includedir}/lib%{name}/
mkdir -p %{buildroot}%{_includedir}/lib%{name}/gui
install -pm 644 ../qt/gui/WizardMatrix.h \
 ../qt/gui/WizardEquation.h \
 ../qt/gui/WizardCatalog.h \
 ../qt/gui/WizardAlgo.h \
 ../qt/gui/spreadsheet.h \
 ../qt/gui/qtmmlwidget.h \
 ../qt/gui/FormalSheet.h \
 ../qt/gui/FormalLineWidgets.h \
 ../qt/gui/FormalLine.h \
 ../qt/gui/CentralTabWidget.h \
 ../qt/gui/prefdialog.h \
 ../qt/gui/plotfunctiondialog.h  %{buildroot}%{_includedir}/lib%{name}/gui/

NB2: libtommath-devel is not used by qcas nor libqcas
Bug fixed in qcas-0.5.3-4
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter
GPG Key: 0x5E212EE1D35568BE
Check on https://keys.fedoraproject.org/

jocaps
Messages : 118
Inscription : lun. avr. 17, 2017 4:32 pm

Re: giacpy 0.6.4

Message par jocaps » ven. janv. 19, 2018 10:12 am

Hi Frederic,

Thanks for the update. Is there already a fix on matrix initialization (deep copy vs. shallow copy of matrix elements) in this version of giacpy? I am talking about having to initilaize matrices by

Code : Tout sélectionner

mat = matrix(3,3)
instead of

Code : Tout sélectionner

mat = matrix(3,3,'(u,v)->0'))
because of a bug in initialization

Edit: It seems that the bug has been fixed.. But I want to make sure if you could confirm. Also, is there a changelog for the versions somewhere? Or an easy access of the commit changes without pulling the source code from some repository?

Jose

parisse
Messages : 5082
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: giacpy 0.6.4

Message par parisse » ven. janv. 19, 2018 10:21 am

The changes in giac are mirrored in the SVN geogebra source tree
https://dev.geogebra.org/trac/browser/t ... /giac/src/

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » ven. janv. 19, 2018 11:49 am

for a giacpy binary (ex what you get on windows from pypi) there are 2 possibility of modifications:
. An update of the giac.dll (I put the version in giacpy changelog on pypi: https://pypi.python.org/pypi/giacpy)
In your example we have giac.dll 1.4.9.43 it is new enough for the fix in matrix. (cf http://xcas.e.ujf-grenoble.fr/XCAS/view ... f=4&t=1955) but I don't see tags for giac versions in geogebra git.

. An update of the giacpy source. details are in the giacpy git:
https://gitlab.math.univ-paris-diderot. ... its/master
(it has tags wih giacpy version)

jocaps
Messages : 118
Inscription : lun. avr. 17, 2017 4:32 pm

Re: giacpy 0.6.4

Message par jocaps » lun. janv. 29, 2018 11:13 am

Hi Frederic,

I was wondering if you can install giacpy wheel using pip installer in Debian systems? Sorry if I do not follow the linux development very closely. I tried doing so and I got complaints on compiling:

Code : Tout sélectionner

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Tj_9pE/giacpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qCpgNn-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-Tj_9pE/giacpy
I do not make anything out of the above error (maybe it is python version related?)

In my office the Debian has python 2.7.9. Do you recommend installing giac and giacpy using apt-get instead?

Jose

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » lun. janv. 29, 2018 2:07 pm

On linux, giacpy is install from source, so iy should not be easier than with sources.
may be if you try with sources

Code : Tout sélectionner

python setup.py build
will give you more explicit messages. But you need at least giac with headers installed, and also python-dev (for python headers) and gmp-dev.

jocaps
Messages : 118
Inscription : lun. avr. 17, 2017 4:32 pm

Re: giacpy 0.6.4

Message par jocaps » mar. janv. 30, 2018 9:58 am

Oh that's a pity. I thought, for linux, installation from python wheel would get me all the dependencies (including possibly sources). This would allow easier installation for non-programmer users. I did a little talk in the university to a group of colleagues promoting both giac and giacpy but I could only show them how to install giacpy in windows.

In any case, I tried installing giacpy in Debian by compiling from source. From giacpy.cpp it does seem that it requires me to have the whole giac source in the same directory where giacpy.cpp is located. Am I right in assuming this? I thought there would be a configuration or makefile where I can tell the installer where giac and giac.h are located.

Jose

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: giacpy 0.6.4

Message par frederic han » mer. janv. 31, 2018 3:08 pm

No, you first need to install giac (not just giac sources). If you are lucky you may try a debian package.
Bernard provide some (with old giacpy packages) built on a debian8 but they works also on some other linux there:
http://www-fourier.ujf-grenoble.fr/~parisse/debian/
and also some for debian9 (see the annonces topics)

then in giacpy dir (the dir containing the setup.py)

Code : Tout sélectionner

python setup.py build
and

Code : Tout sélectionner

python setup.py install

Répondre