From a8d9393b2e5bc5f8fe2a7fdd74bcb052e3287d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=B6rstrup?= Date: Tue, 11 Jun 2024 15:22:14 +0200 Subject: [PATCH] Enable package release (#57) Update setup.py to allow for packaging of the project and update README accordingly. --------- Co-authored-by: Marius Brehler --- .gitignore | 1 + README.md | 11 ++++++++--- setup.py | 19 ++++++++++++++----- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 8459862..bddaa6e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST +.venv *.manifest *.spec diff --git a/README.md b/README.md index 979cc5e..0e7b560 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ SPDX-License-Identifier: MIT Production Flow Description Language =========================== - -pfdl_logo +pfdl_logo

![Tests](https://github.com/iml130/pfdl/actions/workflows/tests.yml/badge.svg?branch=main) @@ -32,6 +31,12 @@ The Scheduler is the main part of the language. It parses PFDL files and generat For more infos visit the official :books: [Documentation](https://iml130.github.io/pfdl/). +## Quick Installation +The fastest way to get the PFDL Scheduler running is by installing the [PyPi package](https://pypi.org/project/pfdl-scheduler/) via pip in a [virtual environment](https://docs.python.org/3/library/venv.html): +> python3 -m venv venv-pfdl +> source venv-pfdl/bin/activate +> pip install pfdl-scheduler + ## Requirements - Pip packages from requirements.txt (`pip install -r requirements.txt`) - [GraphViz](https://graphviz.org/) (if you want to use the scheduler/run the scheduler_demo.py) @@ -79,7 +84,7 @@ No PetriNet is generated / there is an error while generating the net > Check if you correctly installed GraphViz (On Windows you need to put the bin folder inside the GraphViz folder into the PATH environment variable. On Ubuntu it should be fine if you install GraphViz via apt-get) ## License -PDFL is licensed under the MIT License. See [LICENSE](LICENSE) for details on the licensing terms. +PDFL is licensed under the MIT License. See [LICENSE](https://github.com/iml130/pfdl/blob/main/LICENSE) for details on the licensing terms. ## Academic Attribution If you use the PFDL for research, please include the following reference in any resulting publication. diff --git a/setup.py b/setup.py index 7b0331f..41a8933 100644 --- a/setup.py +++ b/setup.py @@ -4,21 +4,30 @@ # For details on the licensing terms, see the LICENSE file. # SPDX-License-Identifier: MIT -from setuptools import setup +from setuptools import setup, find_packages +from pathlib import Path +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text() setup( - name="PFDL Scheduler", - version="0.9.1", - description="Execution engine for Production Flow Description Language (PFDL) files.", - author="Peter Detzner, Maximilian Hoerstrup", + name="pfdl_scheduler", + version="0.9.0", + description="Parser and Scheduler for Production Flow Description Language (PFDL) files.", + long_description=long_description, + long_description_content_type='text/markdown', + author="The PFDL Contributors", author_email="maximilian.hoerstrup@iml.fraunhofer.de", + python_requires = ">=3.10", + packages=find_packages(), classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", + "Operating System :: OS Independent", ], install_requires=[ "antlr4-python3-runtime==4.9.3", "antlr-denter", "snakes", + "requests", ], # external packages as dependencies )