From e556881560d47d1ac79034da99253f1c9c84c92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Tue, 10 Oct 2017 12:22:58 +0200 Subject: Added setup.py file for easy installation --- MANIFEST.in | 4 ++++ README | 3 +++ bin/mensa | 1 + mensa/logic.py | 3 +-- setup.py | 29 +++++++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in create mode 100644 README create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..a71a50d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include mensa/frontends/*.py +include mensa/frontends/*.yapsy-plugin +include mensa/backends/*.py +include mensa/backends/*.yapsy-plugin \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..9a5549f --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +MENSA + +This software fetches menus from restaurants and displays them. \ No newline at end of file diff --git a/bin/mensa b/bin/mensa index b141990..0fa4d81 100755 --- a/bin/mensa +++ b/bin/mensa @@ -1,5 +1,6 @@ #!/usr/bin/python3 import argparse + from mensa import logic from mensa import base diff --git a/mensa/logic.py b/mensa/logic.py index b0165f0..d2851d5 100755 --- a/mensa/logic.py +++ b/mensa/logic.py @@ -5,10 +5,9 @@ import urllib.error import os from yapsy.PluginManager import PluginManager - def init_foodsources(): backends = PluginManager() - backends.setPluginPlaces([os.path.join(os.path.dirname(os.path.realpath(__file__)),"backends")]) + backends.setPluginPlaces([os.path.join(os.path.dirname(os.path.realpath(__file__)),"backends")]) backends.collectPlugins() for pluginInfo in backends.getAllPlugins(): backends.activatePluginByName(pluginInfo.name) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..22085c4 --- /dev/null +++ b/setup.py @@ -0,0 +1,29 @@ +import os +from setuptools import setup + +# Utility function to read the README file. +# Used for the long_description. It's nice, because now 1) we have a top level +# README file and 2) it's easier to type in the README file than to put a raw +# string in below ... +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +setup( + name = "mensa", + version = "0.1.2", + author = "Gabriel PĂ©rez-Cerezo", + author_email = "gabriel@gpcf.eu", + description = ("A program that fetches menus from various restaurants. Pre-installed by default are various cafeterias around TU Berlin."), + license = "MIT", + keywords = "food", + url = "", + packages=['mensa'], + scripts=['bin/mensa'], + long_description=read('README'), + include_package_data=True, + classifiers=[ + "Development Status :: 3 - Alpha", + "Topic :: Utilities", + "License :: OSI Approved :: MIT License", + ], +) -- cgit v1.2.3