Page 1 sur 1

giacpy 0.6.4

Publié : mer. janv. 10, 2018 2:23 pm
par frederic han
btw,
I have updated giacpy on Pypi with version 0.6.4.
(mostly a keyword update, fix for srand ...)

Re: giacpy 0.6.4

Publié : dim. janv. 14, 2018 7:26 pm
par sagitter
GPL-2 file is not in the source archive.
Please, add a license file.

Re: giacpy 0.6.4

Publié : lun. janv. 15, 2018 10:52 am
par frederic han
OK so I have added it in giacpy-0.6.5 on Pypi.

Re: giacpy 0.6.4

Publié : mer. janv. 17, 2018 8:18 am
par sagitter
Have sense packaging the files giacpymisc.h and giacpy.cpp?
They are automatically installed by setup.py script.

Thank you.

Re: giacpy 0.6.4

Publié : mer. janv. 17, 2018 2:58 pm
par frederic han
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

Re: giacpy 0.6.4

Publié : mer. janv. 17, 2018 3:27 pm
par frederic han
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

Re: giacpy 0.6.4

Publié : mer. janv. 17, 2018 10:07 pm
par sagitter
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

Re: giacpy 0.6.4

Publié : ven. janv. 19, 2018 10:12 am
par jocaps
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

Re: giacpy 0.6.4

Publié : ven. janv. 19, 2018 10:21 am
par parisse
The changes in giac are mirrored in the SVN geogebra source tree
https://dev.geogebra.org/trac/browser/t ... /giac/src/

Re: giacpy 0.6.4

Publié : ven. janv. 19, 2018 11:49 am
par frederic han
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)

Re: giacpy 0.6.4

Publié : lun. janv. 29, 2018 11:13 am
par jocaps
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

Re: giacpy 0.6.4

Publié : lun. janv. 29, 2018 2:07 pm
par frederic han
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.

Re: giacpy 0.6.4

Publié : mar. janv. 30, 2018 9:58 am
par jocaps
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

Re: giacpy 0.6.4

Publié : mer. janv. 31, 2018 3:08 pm
par frederic han
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