|
| 1 | +# Copyright (c) 2016-2022 Martin Donath <[email protected]> |
| 2 | + |
| 3 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | +# of this software and associated documentation files (the "Software"), to |
| 5 | +# deal in the Software without restriction, including without limitation the |
| 6 | +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 7 | +# sell copies of the Software, and to permit persons to whom the Software is |
| 8 | +# furnished to do so, subject to the following conditions: |
| 9 | + |
| 10 | +# The above copyright notice and this permission notice shall be included in |
| 11 | +# all copies or substantial portions of the Software. |
| 12 | + |
| 13 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 18 | +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 19 | +# IN THE SOFTWARE. |
| 20 | + |
| 21 | +import json |
| 22 | +from setuptools import setup, find_packages |
| 23 | + |
| 24 | +# Load package.json contents |
| 25 | +with open("package.json") as f: |
| 26 | + package = json.load(f) |
| 27 | + |
| 28 | +# Load list of dependencies |
| 29 | +with open("requirements.txt") as f: |
| 30 | + install_requires = [ |
| 31 | + line for line in f.read().split("\n") |
| 32 | + if line and not line.startswith("#") |
| 33 | + ] |
| 34 | + |
| 35 | +# Load README contents |
| 36 | +with open("README.md", encoding = "utf-8") as f: |
| 37 | + long_description = f.read() |
| 38 | + |
| 39 | +# Package description |
| 40 | +setup( |
| 41 | + name = "mkdocs-material", |
| 42 | + version = package["version"], |
| 43 | + url = package["homepage"], |
| 44 | + project_urls = { |
| 45 | + "Source": "https://github.com/squidfunk/mkdocs-material", |
| 46 | + }, |
| 47 | + license = package["license"], |
| 48 | + description = package["description"], |
| 49 | + long_description = long_description, |
| 50 | + long_description_content_type = "text/markdown", |
| 51 | + author = package["author"]["name"], |
| 52 | + author_email = package["author"]["email"], |
| 53 | + keywords = package["keywords"], |
| 54 | + classifiers = [ |
| 55 | + "Development Status :: 5 - Production/Stable", |
| 56 | + "Environment :: Web Environment", |
| 57 | + "License :: OSI Approved :: MIT License", |
| 58 | + "Programming Language :: JavaScript", |
| 59 | + "Programming Language :: Python", |
| 60 | + "Topic :: Documentation", |
| 61 | + "Topic :: Software Development :: Documentation", |
| 62 | + "Topic :: Text Processing :: Markup :: HTML" |
| 63 | + ], |
| 64 | + packages = find_packages(exclude = ["src", "src.*"]), |
| 65 | + include_package_data = True, |
| 66 | + install_requires = install_requires, |
| 67 | + python_requires='>=3.7', |
| 68 | + entry_points = { |
| 69 | + "mkdocs.themes": [ |
| 70 | + "material = material" |
| 71 | + ], |
| 72 | + "mkdocs.plugins": [ |
| 73 | + "search = material.plugins.search.plugin:SearchPlugin", |
| 74 | + "tags = material.plugins.tags.plugin:TagsPlugin" |
| 75 | + ] |
| 76 | + }, |
| 77 | + zip_safe = False |
| 78 | +) |
0 commit comments