Skip to content

vinklein/pypolymake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypolymake
==========

What is it?
-----------

The Python module pypolymake provides wrappers for `polymake version 3.1
<https://polymake.org/doku.php>`_.

The language has been kept as close as possible as the original. The
following polymake construction::

    polytope> $c = cube(5);
    polytope> print $c->F_VECTOR;
    32 80 80 40 10
    polytope> $g = $c->GRAPH;
    polytope> print $g->DIAMETER;
    5

is translated in Python as::

    >>> from polymake import *
    >>> c = cube(5)
    >>> print(c.F_VECTOR)
    (32, 80, 80, 40, 10)
    >>> g = c.GRAPH
    >>> print(g.DIAMETER)
    5

The library is currently under development and is compatible with Python2 and
Python3. As it is under development, many things are not working and are likely
to break.

Installation and source code
----------------------------

In principle, pypolymake could be used with Python2, Python3 and within Sage.

### Installation against the beta version of polymake in Python2 or Python3

Just run the following command to install pypolymake

    $ pip install git+https://github.com/videlec/pypolymake [--user] [--upgrade]

### Installation inside Sage

If you are using `SageMath <http://www.sagemath.org>`_ version at least 8.beta0 then
run the following two commands to install polymake and pypolymake

    $ sage -i polymake
    $ sage -pip install git+https://github.com/videlec/pypolymake [--user] [--upgrade]

### Notes

If polymake headers or libraries are installed in a non standard location you
may need to set the environment variables CFLAGS, CXXFLAGS, LDFLAGS. For example,
on OS X, you need to update LDFLAGS as::

    $ export LDFLAGS="-L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ $LDFLAGS"
    $ python setup.py install --user

You might also need to set LD_LIBRARY_PATH before starting Python if the shared
library of polymake (libpolymake.so) is not in a standard directory. For example

    $ LD_LIBRARY_PATH=/my/path/to/lib/ ipython

License
-------

The library pypolymake is distributed under the terms of the GNU General Public
License (GPL) as published by the Free Software Foundation; either version 3 of
the License, or (at your option) any later version (see http://www.gnu.org/licenses/)

Authors
-------

This project has been started by Burcin Erocal in 2011 and continued
by Vincent Delecroix in 2016

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%