2017-02-26 13:47:06 +01:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
Boxes.py is a pure Python project that does support the regular setuptools
|
2019-02-27 23:31:41 +01:00
|
|
|
method of shipping with :code:`setup.py`. :code:`setup.py --help-commands` and
|
|
|
|
:code:`setup.py CMD --help` provide the necessary documentation for building,
|
2017-02-26 13:47:06 +01:00
|
|
|
installing or building binary formats.
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
|
|
|
Cairo
|
|
|
|
.....
|
2017-05-04 19:37:56 +02:00
|
|
|
Boxes.py is based on the cairo graphics library. It supports both the PyPi
|
2019-02-27 23:31:41 +01:00
|
|
|
version :code:`cairocffi` and :code:`python-cairo` that might be shipped with
|
|
|
|
your distribution.
|
2017-02-26 13:47:06 +01:00
|
|
|
|
2018-08-15 12:08:31 +02:00
|
|
|
Markdown
|
|
|
|
........
|
2019-02-27 23:31:41 +01:00
|
|
|
:code:`Markdown` (package name may be :code:`python-markdown` or
|
|
|
|
:code:`python3-markdown`) is used to format the description texts.
|
2018-08-15 12:08:31 +02:00
|
|
|
|
2017-03-10 22:58:52 +01:00
|
|
|
LXML
|
|
|
|
....
|
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
:code:`lxml` (package name may be :code:`python-lxml` or :code:`python3-lxml`)
|
|
|
|
is needed for the Inkscape plugin.
|
2017-03-10 22:58:52 +01:00
|
|
|
|
2018-09-09 16:20:04 +02:00
|
|
|
setuptools
|
|
|
|
..........
|
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
Setup.py uses the :code:`setuptools` library (package name may be
|
|
|
|
:code:`python*-setuptools`). You only need it if you want to build the
|
2018-09-09 16:20:04 +02:00
|
|
|
package.
|
|
|
|
|
2017-02-26 13:47:06 +01:00
|
|
|
ps2edit
|
|
|
|
.......
|
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
While not a hard requirement Boxes.py uses :code:`ps2edit` to offer formats
|
|
|
|
that are not supported by Cairo: DXF, gcode, PLT. Currently the location
|
|
|
|
Boxes.py looks for :code:`ps2edit` is hard coded to :code:`/usr/bin/pstoedit`
|
|
|
|
in the :code:`boxes.formats.Formats` class.
|
2017-02-26 13:47:06 +01:00
|
|
|
|
|
|
|
Python
|
|
|
|
......
|
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
Boxes.py - while defaulting to Python 3 - can also run on Python 2.7.
|
|
|
|
If you encounter any compatibility issues please report them at the
|
2019-02-25 23:34:56 +01:00
|
|
|
`GitHub project <https://github.com/florianfesti/boxes>`__.
|
2017-02-26 13:47:06 +01:00
|
|
|
|
|
|
|
Running from working dir
|
|
|
|
------------------------
|
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
Due to lazy developer(s) Boxes.py can also run from the Git checkout.
|
|
|
|
The scripts in :code:`scripts/` are all suppossed to just work right
|
|
|
|
after :code:`git clone`. The Inkscape needs a bit manual work to get
|
2017-02-26 13:47:06 +01:00
|
|
|
running. See below.
|
|
|
|
|
|
|
|
Inkscape
|
|
|
|
--------
|
|
|
|
|
|
|
|
Boxes.py can be used as a set of Inkscape plugins. The package does
|
2019-02-27 23:31:41 +01:00
|
|
|
install the necessary .inx files to :code:`/usr/share/inkscape/extensions`
|
|
|
|
on unix operating systems. The .inx files assume that the :code:`boxes`
|
|
|
|
executable is available in the :code:`PATH` (which it is when installing the
|
|
|
|
binary package).
|
|
|
|
|
|
|
|
On non-Unix operating systems or when running Boxes.py from Git
|
|
|
|
checkout the .inx files need to be copied by hand. :code:`setup.py build`
|
|
|
|
creates them in the :code:`inkex/` directory. They then have to be copied in
|
2017-02-26 13:47:06 +01:00
|
|
|
either the global or the per user extension directory of
|
2019-02-27 23:31:41 +01:00
|
|
|
Inkscape. These are :code:`/usr/share/inkscape/extensions/` and
|
|
|
|
:code:`~/.config/inkscape/extensions/` on Unix. On other operating systems
|
2017-02-26 13:47:06 +01:00
|
|
|
you can look up *Edit -> Preferences... -> System* in the Inkscape
|
|
|
|
menu to look up *User extensions* and *Inkscape extensions*. It may be
|
|
|
|
more convenient to generate the .inx files right in place by executing
|
2019-02-27 23:31:41 +01:00
|
|
|
:code:`scripts/boxes2inkscape` with the target path as only parameter.
|
2017-02-26 13:47:06 +01:00
|
|
|
|
2019-02-27 23:31:41 +01:00
|
|
|
After placing the .inx files you need to make the :code:`boxes` script
|
|
|
|
available in the :code:`PATH`. One way is to create a symlink from a location
|
2017-02-26 13:47:06 +01:00
|
|
|
that is in the path or installing the package on the system.
|
|
|
|
|
2019-02-26 19:21:55 +01:00
|
|
|
Platform specific instructions
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
:glob:
|
|
|
|
|
|
|
|
install/*
|
|
|
|
|