{"id":13420039,"url":"https://github.com/serge-sans-paille/pythran","last_synced_at":"2025-05-15T01:03:16.162Z","repository":{"id":3427798,"uuid":"4479494","full_name":"serge-sans-paille/pythran","owner":"serge-sans-paille","description":"Ahead of Time compiler for numeric kernels","archived":false,"fork":false,"pushed_at":"2025-05-05T05:59:23.000Z","size":37176,"stargazers_count":2058,"open_issues_count":148,"forks_count":195,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-07T23:44:14.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pythran.readthedocs.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serge-sans-paille.png","metadata":{"files":{"readme":"README.rst","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-05-29T08:02:14.000Z","updated_at":"2025-05-07T11:00:46.000Z","dependencies_parsed_at":"2024-01-15T20:56:08.067Z","dependency_job_id":"f67414ee-d6a1-41e2-bd69-c134b50dd669","html_url":"https://github.com/serge-sans-paille/pythran","commit_stats":{"total_commits":2873,"total_committers":83,"mean_commits":34.6144578313253,"dds":"0.28611207796728155","last_synced_commit":"036bff4df02f3eddbeed09cd0aee88122c6693ae"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serge-sans-paille%2Fpythran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serge-sans-paille%2Fpythran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serge-sans-paille%2Fpythran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serge-sans-paille%2Fpythran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serge-sans-paille","download_url":"https://codeload.github.com/serge-sans-paille/pythran/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254040,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:25.042Z","updated_at":"2025-05-15T01:03:16.120Z","avatar_url":"https://github.com/serge-sans-paille.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","C++","Linear Algebra / Statistics Toolkit","Software","Others","其他_机器学习与深度学习","Python / C++","Python","Subsets of Python"],"sub_categories":["General Purpose Tensor Library","Alternatives","Mojo🔥FastAPI Client"],"readme":"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        $\u003e sudo apt-get install libatlas-base-dev\n        $\u003e sudo apt-get install python-dev python-ply python-numpy\n\n2. Install with ``pip``::\n\n        $\u003e pip install pythran\n\nUsing ``mamba`` or ``conda``\n****************************\n\n1. Using ``mamba`` (https://github.com/conda-forge/miniforge) or ``conda`` (https://github.com/conda-forge/miniforge)\n \n2. Run::\n\n       $\u003e mamba install -c conda-forge pythran\n\n   or::\n\n       $\u003e conda install -c conda-forge pythran\n\nMac OSX\n=======\n\nUsing brew (https://brew.sh/)::\n\n    $\u003e pip install pythran\n    $\u003e brew install openblas\n    $\u003e printf '[compiler]\\nblas=openblas\\ninclude_dirs=/usr/local/opt/openblas/include\\nlibrary_dirs=/usr/local/opt/openblas/lib' \u003e ~/.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    $\u003e pacman -S python-pythran\n\n\nFedora\n======\n\nUsing ``dnf``::\n\n    $\u003e 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    $\u003e 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    $\u003e pythran dprod.py\n\nThat will generate a native dprod.so that can be imported just like the former\nmodule::\n\n    $\u003e 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    $\u003e 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    $\u003e pydoc pythran\n    $\u003e pydoc pythran.typing\n    $\u003e 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 \\\u0026 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserge-sans-paille%2Fpythran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserge-sans-paille%2Fpythran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserge-sans-paille%2Fpythran/lists"}