1
- from setuptools import setup , find_packages
1
+ import shutil
2
+ from pathlib import Path
3
+ from typing import Any
4
+
5
+ from setuptools import find_packages , setup
2
6
3
7
version = "2.0.9"
4
8
9
+ requirements = Path ("requirements.txt" )
10
+ readme = Path ("README.md" )
11
+
5
12
6
- def classification_dependencies ():
7
- with open ("requirements.txt " ) as f :
13
+ def classification_dependencies () -> tuple [ list [ Any ], list [ Any ]] :
14
+ with requirements . open ("r" , encoding = "UTF-8 " ) as f :
8
15
external = []
9
16
internal = []
10
17
for package in f .read ().splitlines ():
@@ -15,11 +22,15 @@ def classification_dependencies():
15
22
return external , internal
16
23
17
24
18
- with open ("README.md" , "r" , encoding = "utf-8" ) as fh :
25
+ with readme . open ("r" , encoding = "utf-8" ) as fh :
19
26
long_description = fh .read ()
20
27
21
28
external , internal = classification_dependencies ()
22
29
30
+ # remove old dist version
31
+
32
+ shutil .rmtree ("dist" , ignore_errors = True )
33
+
23
34
setup (
24
35
name = "mkdocs_embed_file_plugins" ,
25
36
python_requires = ">=3.7" ,
@@ -38,15 +49,10 @@ def classification_dependencies():
38
49
"Topic :: Text Processing :: Markup :: Markdown" ,
39
50
"License :: OSI Approved :: GNU Affero General Public License v3 or later"
40
51
" (AGPLv3+)" ,
41
- "Programming Language :: Python :: 3" ,
42
- "Programming Language :: Python :: 3.6" ,
43
- "Programming Language :: Python :: 3.7" ,
44
- "Programming Language :: Python :: 3.8" ,
45
- "Programming Language :: Python :: 3.9" ,
46
52
],
47
53
long_description = long_description ,
48
54
long_description_content_type = "text/markdown" ,
49
- url = "https://github.com/Mara-Li/mkdocs_embed_file_plugins " ,
55
+ url = "https://github.com/ObsidianPublisher/mkdocs-embed_file-plugin " ,
50
56
entry_points = {
51
57
"mkdocs.plugins" : ["embed_file=mkdocs_embed_file_plugins.plugin:EmbedFile" ]
52
58
},
0 commit comments