Name | pythran JSON |
Version |
0.17.0
JSON |
| download |
home_page | None |
Summary | Ahead of Time compiler for numeric kernels |
upload_time | 2024-10-31 09:34:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | Copyright (c) 2012, HPC Project and Serge Guelton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of HPCProject, Serge Guelton nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Pythran
#######
https://pythran.readthedocs.io
What is it?
-----------
Pythran is an ahead of time compiler for a subset of the Python language, with a
focus on scientific computing. It takes a Python module annotated with a few
interface descriptions and turns it into a native Python module with the same
interface, but (hopefully) faster.
It is meant to efficiently compile **scientific programs**, and takes advantage
of multi-cores and SIMD instruction units.
Until 0.9.5 (included), Pythran was supporting Python 3 and Python 2.7.
It now only supports Python **3**.
Installation
------------
Pythran sources are hosted on https://github.com/serge-sans-paille/pythran.
Pythran releases are hosted on https://pypi.python.org/pypi/pythran.
Pythran is available on conda-forge on https://anaconda.org/conda-forge/pythran.
Debian/Ubuntu
=============
Using ``pip``
*************
1. Gather dependencies:
Pythran depends on a few Python modules and several C++ libraries. On a debian-like platform, run::
$> sudo apt-get install libatlas-base-dev
$> sudo apt-get install python-dev python-ply python-numpy
2. Install with ``pip``::
$> pip install pythran
Using ``mamba`` or ``conda``
****************************
1. Using ``mamba`` (https://github.com/conda-forge/miniforge#mambaforge) or ``conda`` (https://github.com/conda-forge/miniforge)
2. Run::
$> mamba install -c conda-forge pythran
or::
$> conda install -c conda-forge pythran
Mac OSX
=======
Using brew (https://brew.sh/)::
$> pip install pythran
$> brew install openblas
$> printf '[compiler]\nblas=openblas\ninclude_dirs=/usr/local/opt/openblas/include\nlibrary_dirs=/usr/local/opt/openblas/lib' > ~/.pythranrc
Depending on your setup, you may need to add the following to your ``~/.pythranrc`` file::
[compiler]
CXX=g++-4.9
CC=gcc-4.9
ArchLinux
=========
Using ``pacman``::
$> pacman -S python-pythran
Fedora
======
Using ``dnf``::
$> dnf install pythran
Windows
=======
Windows support is on going and only targets Python 3.5+ with either Visual Studio 2017 or, better, clang-cl::
$> pip install pythran
Note that using ``clang-cl.exe`` is the default setting. It can be changed
through the ``CXX`` and ``CC`` environment variables.
Other Platform
==============
See MANUAL file.
Basic Usage
-----------
A simple pythran input could be ``dprod.py``
.. code-block:: python
"""
Naive dotproduct! Pythran supports numpy.dot
"""
#pythran export dprod(int list, int list)
def dprod(l0,l1):
"""WoW, generator expression, zip and sum."""
return sum(x * y for x, y in zip(l0, l1))
To turn it into a native module, run::
$> pythran dprod.py
That will generate a native dprod.so that can be imported just like the former
module::
$> python -c 'import dprod' # this imports the native module instead
Documentation
-------------
The user documentation is available in the MANUAL file from the doc directory.
The developer documentation is available in the DEVGUIDE file from the doc
directory. There is also a TUTORIAL file for those who don't like reading
documentation.
The CLI documentation is available from the pythran help command::
$> pythran --help
Some extra developer documentation is also available using pydoc. Beware, this
is the computer science incarnation for the famous Where's Waldo? game::
$> pydoc pythran
$> pydoc pythran.typing
$> pydoc -b # in the browser
Examples
--------
See the ``pythran/tests/cases/`` directory from the sources.
Contact
-------
Praise, flame and cookies:
- pythran@freelists.org -- register at https://www.freelists.org/list/pythran first!
- #pythran on OFTC, https://oftc.net
- serge.guelton@telecom-bretagne.eu
The mailing list archive is available at https://www.freelists.org/archive/pythran/.
Citing
------
If you need to cite a Pythran paper, feel free to use
.. code-block:: bibtex
@article{guelton2015pythran,
title={Pythran: Enabling static optimization of scientific python programs},
author={Guelton, Serge and Brunet, Pierrick and Amini, Mehdi and Merlini,
Adrien and Corbillon, Xavier and Raynaud, Alan},
journal={Computational Science \& Discovery},
volume={8},
number={1},
pages={014001},
year={2015},
publisher={IOP Publishing}
}
Authors
-------
See AUTHORS file.
License
-------
See LICENSE file.
Raw data
{
"_id": null,
"home_page": null,
"name": "pythran",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Serge Guelton <serge.guelton@telecom-bretagne.eu>",
"download_url": "https://files.pythonhosted.org/packages/34/2d/4ac363a2eecd68c372b058d1b95a5f262c70776e107619cdcb5a4b68e1a3/pythran-0.17.0.tar.gz",
"platform": null,
"description": "Pythran\n#######\n\nhttps://pythran.readthedocs.io\n\nWhat is it?\n-----------\n\nPythran is an ahead of time compiler for a subset of the Python language, with a\nfocus on scientific computing. It takes a Python module annotated with a few\ninterface descriptions and turns it into a native Python module with the same\ninterface, but (hopefully) faster.\n\nIt is meant to efficiently compile **scientific programs**, and takes advantage\nof multi-cores and SIMD instruction units.\n\nUntil 0.9.5 (included), Pythran was supporting Python 3 and Python 2.7.\nIt now only supports Python **3**.\n\nInstallation\n------------\n\nPythran sources are hosted on https://github.com/serge-sans-paille/pythran.\n\nPythran releases are hosted on https://pypi.python.org/pypi/pythran.\n\nPythran is available on conda-forge on https://anaconda.org/conda-forge/pythran.\n\nDebian/Ubuntu\n=============\n\nUsing ``pip``\n*************\n\n1. Gather dependencies:\n\n Pythran depends on a few Python modules and several C++ libraries. On a debian-like platform, run::\n\n $> sudo apt-get install libatlas-base-dev\n $> sudo apt-get install python-dev python-ply python-numpy\n\n2. Install with ``pip``::\n\n $> pip install pythran\n\nUsing ``mamba`` or ``conda``\n****************************\n\n1. Using ``mamba`` (https://github.com/conda-forge/miniforge#mambaforge) or ``conda`` (https://github.com/conda-forge/miniforge)\n \n2. Run::\n\n $> mamba install -c conda-forge pythran\n\n or::\n\n $> conda install -c conda-forge pythran\n\nMac OSX\n=======\n\nUsing brew (https://brew.sh/)::\n\n $> pip install pythran\n $> brew install openblas\n $> printf '[compiler]\\nblas=openblas\\ninclude_dirs=/usr/local/opt/openblas/include\\nlibrary_dirs=/usr/local/opt/openblas/lib' > ~/.pythranrc\n\nDepending on your setup, you may need to add the following to your ``~/.pythranrc`` file::\n\n [compiler]\n CXX=g++-4.9\n CC=gcc-4.9\n\nArchLinux\n=========\n\nUsing ``pacman``::\n\n $> pacman -S python-pythran\n\n\nFedora\n======\n\nUsing ``dnf``::\n\n $> dnf install pythran\n\nWindows\n=======\n\nWindows support is on going and only targets Python 3.5+ with either Visual Studio 2017 or, better, clang-cl::\n\n $> pip install pythran\n\nNote that using ``clang-cl.exe`` is the default setting. It can be changed\nthrough the ``CXX`` and ``CC`` environment variables.\n\n\nOther Platform\n==============\n\nSee MANUAL file.\n\n\nBasic Usage\n-----------\n\nA simple pythran input could be ``dprod.py``\n\n.. code-block:: python\n\n \"\"\"\n Naive dotproduct! Pythran supports numpy.dot\n \"\"\"\n #pythran export dprod(int list, int list)\n def dprod(l0,l1):\n \"\"\"WoW, generator expression, zip and sum.\"\"\"\n return sum(x * y for x, y in zip(l0, l1))\n\n\nTo turn it into a native module, run::\n\n $> pythran dprod.py\n\nThat will generate a native dprod.so that can be imported just like the former\nmodule::\n\n $> python -c 'import dprod' # this imports the native module instead\n\n\nDocumentation\n-------------\n\nThe user documentation is available in the MANUAL file from the doc directory.\n\nThe developer documentation is available in the DEVGUIDE file from the doc\ndirectory. There is also a TUTORIAL file for those who don't like reading\ndocumentation.\n\nThe CLI documentation is available from the pythran help command::\n\n $> pythran --help\n\nSome extra developer documentation is also available using pydoc. Beware, this\nis the computer science incarnation for the famous Where's Waldo? game::\n\n $> pydoc pythran\n $> pydoc pythran.typing\n $> pydoc -b # in the browser\n\n\nExamples\n--------\n\nSee the ``pythran/tests/cases/`` directory from the sources.\n\n\nContact\n-------\n\nPraise, flame and cookies:\n\n- pythran@freelists.org -- register at https://www.freelists.org/list/pythran first!\n\n- #pythran on OFTC, https://oftc.net \n\n- serge.guelton@telecom-bretagne.eu\n\nThe mailing list archive is available at https://www.freelists.org/archive/pythran/.\n\nCiting\n------\n\nIf you need to cite a Pythran paper, feel free to use\n\n.. code-block:: bibtex\n\n @article{guelton2015pythran,\n title={Pythran: Enabling static optimization of scientific python programs},\n author={Guelton, Serge and Brunet, Pierrick and Amini, Mehdi and Merlini,\n Adrien and Corbillon, Xavier and Raynaud, Alan},\n journal={Computational Science \\& Discovery},\n volume={8},\n number={1},\n pages={014001},\n year={2015},\n publisher={IOP Publishing}\n }\n\n\nAuthors\n-------\n\nSee AUTHORS file.\n\nLicense\n-------\n\nSee LICENSE file.\n",
"bugtrack_url": null,
"license": "Copyright (c) 2012, HPC Project and Serge Guelton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of HPCProject, Serge Guelton nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
"summary": "Ahead of Time compiler for numeric kernels",
"version": "0.17.0",
"project_urls": {
"Changelog": "https://pythran.readthedocs.io/en/latest/Changelog.html",
"Documentation": "https://pythran.readthedocs.io",
"Homepage": "https://github.com/serge-sans-paille/pythran"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "650a557cef9d89cd21d7a4850c31701b7cfa78f6cc8b09249df678d174b6e6ca",
"md5": "e117b44b6b3e010f4eb88272190ef6b2",
"sha256": "be569cc2817b625ccd2c8f74fa3c93806f245c65fadc282c26a9f546ebd34cfa"
},
"downloads": -1,
"filename": "pythran-0.17.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e117b44b6b3e010f4eb88272190ef6b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4337519,
"upload_time": "2024-10-31T09:34:16",
"upload_time_iso_8601": "2024-10-31T09:34:16.579503Z",
"url": "https://files.pythonhosted.org/packages/65/0a/557cef9d89cd21d7a4850c31701b7cfa78f6cc8b09249df678d174b6e6ca/pythran-0.17.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "342d4ac363a2eecd68c372b058d1b95a5f262c70776e107619cdcb5a4b68e1a3",
"md5": "b754bc4c5cf37c4f0c4a3ae38009e799",
"sha256": "3b77d6d970a6cf5b448facc7d4f6229c3e73909ac27ea2480c843afdadbad0fb"
},
"downloads": -1,
"filename": "pythran-0.17.0.tar.gz",
"has_sig": false,
"md5_digest": "b754bc4c5cf37c4f0c4a3ae38009e799",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 2394494,
"upload_time": "2024-10-31T09:34:20",
"upload_time_iso_8601": "2024-10-31T09:34:20.043912Z",
"url": "https://files.pythonhosted.org/packages/34/2d/4ac363a2eecd68c372b058d1b95a5f262c70776e107619cdcb5a4b68e1a3/pythran-0.17.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 09:34:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "serge-sans-paille",
"github_project": "pythran",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pythran"
}