Skip to content

Commit

Permalink
Update installation notes
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Sep 2, 2023
1 parent 5c683a2 commit b7efdf7
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 3 deletions.
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,20 @@ mappyfile is available on `PyPI <https://pypi.org/project/mappyfile/>`_ (the Pyt
This will also install its required dependencies - `Lark <https://github.com/lark-parser/lark>`__, and
`jsonschema <https://github.com/python-jsonschema/jsonschema>`_.

To install the optional `lark-cython <https://github.com/lark-parser/lark_cython>`_ library
for better performance on CPython you can run the following command:

.. code-block:: console
pip install mappyfile[lark_cython]
mappyfile is also available on `conda <https://anaconda.org/conda-forge/mappyfile>`_. Install as
follows:

.. code-block:: console
conda install -c conda-forge mappyfile
Documentation
-------------

Expand Down Expand Up @@ -101,6 +111,7 @@ Contributors
* Loïc Gasser `@loicgasser <https://github.com/loicgasser>`_
* Ian Turton `@ianturton <https://github.com/ianturton>`_
* `@thorag76 <https://github.com/thorag76>`_
* TC Haddad `@tchaddad <https://github.com/tchaddad>`_ (Conda support)

.. |Version| image:: https://img.shields.io/pypi/v/mappyfile.svg
:target: https://pypi.python.org/pypi/mappyfile
Expand Down
59 changes: 56 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

A Python library to create, parse, modify, and format `MapServer <http://mapserver.org/documentation.html>`_ Mapfiles.

+ Python 2 and 3 compatible
+ Pure Python - no MapServer dependencies
+ Open Source License (MIT)

Expand All @@ -30,9 +29,65 @@ A presentation on mappyfile was given at `FOSS4G Europe 2017 <https://europe.fos
api/main.rst
testing.rst
development.rst
HISTORY.rst

.. image:: images/class_parsed.png

Installation
------------

mappyfile is available on `PyPI <https://pypi.org/project/mappyfile/>`_ (the Python Package Index), and can be installed using pip:

.. code-block:: console
pip install mappyfile
This will also install its required dependencies - `Lark <https://github.com/lark-parser/lark>`__, and
`jsonschema <https://github.com/python-jsonschema/jsonschema>`_.

To install the optional `lark-cython <https://github.com/lark-parser/lark_cython>`_ library
for better performance on CPython you can run the following command:

.. code-block:: console
pip install mappyfile[lark_cython]
If lark-cython is installed it will be used automatically. If it is installed and you want to disable its
use in mappyfile you can set the ``MAPPYFILE_USE_CYTHON`` to ``False`` (or any falsy value).

.. code-block:: console
# Linux
export MAPPYFILE_USE_CYTHON="False"
# Windows PowerShell
$env:MAPPYFILE_USE_CYTHON="False"
# Windows Command Line
set MAPPYFILE_USE_CYTHON=False
mappyfile is also available on `conda <https://anaconda.org/conda-forge/mappyfile>`_. Install as
follows:

.. code-block:: console
conda install -c conda-forge mappyfile
To setup a Conda environment containing mappyfile from scratch on Windows download
`Miniconda3 Windows 64-bit <https://conda.io/projects/conda/en/latest/user-guide/install/windows.html>`_
and run the following commands:

.. code-block:: console
conda create --name mappyfile-env
conda activate mappyfile-env
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install mappyfile --yes
mappyfile --help
What is mappyfile?
------------------

Expand Down Expand Up @@ -170,8 +225,6 @@ Future development plans, leading to a v1.0 release include:
+ Add an example of creating Mapfiles using YAML
+ Create a new ``prune`` function to remove redundant default settings from a Mapfile

.. include:: HISTORY.rst


.. _Stop using MapScript: https://sgillies.net/2006/11/29/stop-using-mapscript.html
.. _Declarative Maps: https://sgillies.net/2006/12/01/declarative-maps.html
Expand Down

0 comments on commit b7efdf7

Please sign in to comment.