aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-10-10 12:22:58 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-10-10 12:22:58 +0200
commite556881560d47d1ac79034da99253f1c9c84c92b (patch)
tree5ae8b934d2b4b3f468c466521597c6ebf1628a7c
parentc9c7d389c45815e1b7abd7bea7dc5093a3630ea2 (diff)
downloadmensa-e556881560d47d1ac79034da99253f1c9c84c92b.tar.gz
mensa-e556881560d47d1ac79034da99253f1c9c84c92b.tar.bz2
mensa-e556881560d47d1ac79034da99253f1c9c84c92b.zip
Added setup.py file for easy installation
-rw-r--r--MANIFEST.in4
-rw-r--r--README3
-rwxr-xr-xbin/mensa1
-rwxr-xr-xmensa/logic.py3
-rw-r--r--setup.py29
5 files changed, 38 insertions, 2 deletions
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",
+ ],
+)