From e8074252ca37b9a71629a5d50b3901bd09832080 Mon Sep 17 00:00:00 2001 From: jtc42 Date: Sun, 6 Jan 2019 18:37:25 +0000 Subject: [PATCH] Migrate to Poetry pyproject.toml --- pyproject.toml | 23 ++++++++++++++++++++ requirements.txt | 11 ---------- setup.py | 56 ------------------------------------------------ 3 files changed, 23 insertions(+), 67 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..05ab85d1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" + +[tool.poetry] +name = "openflexure-microscope-software" +version = "1.0.0" +description = "Python module, and Flask-based web API, to run the OpenFlexure Microscope." +authors = ["Joel Collins "] +license = "GPL-3.0" + +[tool.poetry.dependencies] +python = "^3.5" +Flask = "^1.0" +pyyaml = "^3.13" +numpy = "^1.15" +Pillow = "^5.4" +# RPi.GPIO = "^0.6.5" # To be added on pi (poetry add RPi.GPIO) +# picamera = "^1.13" # To be added on pi (poetry add picamera). Need to check lens shading compatibility. +# openflexure-stage = ">0.1.1" # Can't resolve until updated on PyPI + +[tool.poetry.dev-dependencies] +sphinxcontrib-httpdomain = "^1.7" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 37ea4f8d..00000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ --e git://github.com/rwb27/openflexure_nano_motor_controller.git#egg=openflexure_stage --e git://github.com/rwb27/picamera.git@lens-shading#egg=picamera - -flask >= 0.12.3 -pyyaml==3.13 -numpy -Pillow -RPi.GPIO - -gunicorn -sphinxcontrib-httpdomain \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 2410c13b..00000000 --- a/setup.py +++ /dev/null @@ -1,56 +0,0 @@ -from setuptools import setup, find_packages -from codecs import open -from os import path -import re - -__author__ = 'Joel Collins' - -HERE = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(HERE, 'README.md'), encoding='utf-8') as f: - LONG_DESCRIPTION = f.read() - - -def find_version(): - """Determine the version based on __init__.py.""" - with open(path.join(HERE, "openflexure_microscope", "__init__.py"), 'r') as f: - init_py = f.read() - version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", init_py, re.M) - if version_match: - return version_match.group(1) - raise RuntimeError("Couldn't parse version string from __init__.py") - -VERSION = find_version() - -setup( - name='openflexure_microscope', - version=VERSION, - description='Control scripts for the OpenFlexure Microscope', - long_description=LONG_DESCRIPTION, - author='Joel Collins', - author_email='joel@jtcollins.net', - packages=find_packages(), - keywords=['arduino', 'python', 'serial', 'microscope'], - zip_safe=True, - classifiers=[ - 'Development Status :: 3 - Alpha', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 3.5' - ], - install_requires=[ - 'pyserial', - 'future', - 'openflexure_stage', - 'flask', - 'itsdangerous', - 'Jinja2', - 'MarkupSafe', - 'picamera', - 'Werkzeug', - 'pyyaml', - 'numpy', - 'Pillow', - 'RPi.GPIO', - ], -)