From 65d725f2605e16bd37e3b6e9c7651c89f7e50d06 Mon Sep 17 00:00:00 2001
From: squidfunk <scifish@gmail.com>
Date: Sat, 14 Jan 2017 23:05:18 +0100
Subject: [PATCH] Load package specs in setup.py from package.json

---
 setup.py | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/setup.py b/setup.py
index 47efa3f7..6acaf1ac 100644
--- a/setup.py
+++ b/setup.py
@@ -18,18 +18,23 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
+import json
 from setuptools import setup, find_packages
 
+# Load package.json contents
+with open("package.json") as data:
+    package = json.load(data)
+
 # Package description
 setup(
-    name = "mkdocs-material",
-    version = "1.0.1",
-    url = "http://squidfunk.github.io/mkdocs-material/",
-    license = "MIT",
-    description = "A Material Design theme for MkDocs",
-    author = "Martin Donath",
-    author_email = "martin.donath@squidfunk.com",
-    keywords = ["mkdocs", "documentation", "theme"],
+    name = package["name"],
+    version = package["version"],
+    url = package["homepage"],
+    license = package["license"],
+    description = package["description"],
+    author = package["author"]["name"],
+    author_email = package["author"]["email"],
+    keywords = package["keywords"],
     packages = find_packages(),
     include_package_data = True,
     entry_points = {
-- 
GitLab