|
1 |
| -# Copyright (c) 2016-2022 Martin Donath <[email protected]> |
| 1 | +import sys |
2 | 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: |
| 3 | +from setuptools import setup |
9 | 4 |
|
10 |
| -# The above copyright notice and this permission notice shall be included in |
11 |
| -# all copies or substantial portions of the Software. |
| 5 | +sys.stderr.write( |
| 6 | + """ |
| 7 | +=============================== |
| 8 | +Unsupported installation method |
| 9 | +=============================== |
| 10 | +This version of mkdocs-material no longer supports |
| 11 | +installation with `python setup.py install`. |
12 | 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. |
| 13 | +Please use `python -m pip install .` instead. |
| 14 | +""" |
| 15 | +) |
| 16 | +sys.exit(1) |
20 | 17 |
|
21 |
| -import json |
22 |
| -from setuptools import setup, find_packages |
23 | 18 |
|
24 |
| -# Load package.json contents |
25 |
| -with open("package.json") as f: |
26 |
| - package = json.load(f) |
| 19 | +# The below code will never execute, however GitHub is particularly |
| 20 | +# picky about where it finds Python packaging metadata. |
| 21 | +# See: https://github.com/github/feedback/discussions/6456 |
27 | 22 |
|
28 |
| -# Load list of dependencies |
29 | 23 | with open("requirements.txt") as f:
|
30 | 24 | install_requires = [
|
31 | 25 | line for line in f.read().split("\n")
|
32 | 26 | if line and not line.startswith("#")
|
33 | 27 | ]
|
34 | 28 |
|
35 |
| -# Load README contents |
36 |
| -with open("README.md", encoding = "utf-8") as f: |
37 |
| - long_description = f.read() |
38 |
| - |
39 |
| -# Package description |
40 | 29 | 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 |
| - "social = material.plugins.social.plugin:SocialPlugin", |
75 |
| - "tags = material.plugins.tags.plugin:TagsPlugin" |
76 |
| - ] |
77 |
| - }, |
78 |
| - zip_safe = False |
| 30 | + name="mkdocs-material", |
| 31 | + install_requires=install_requires, |
79 | 32 | )
|
0 commit comments