Skip to content

Commit 84cd36f

Browse files
committed
chore: fix Pipfile
1 parent 0f029d4 commit 84cd36f

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ python_version = "3.12"
2323

2424
[scripts]
2525
black = "black ."
26-
build = "python setup.py sdist bdist_wheel"
26+
build = "python -m build --sdist --wheel --outdir dist --no-isolation"
2727
upload = "twine upload dist/*"
2828
version="semantic-release version"
2929
publish = "semantic-release publish"

setup.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
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
26

37
version = "2.0.9"
48

9+
requirements = Path("requirements.txt")
10+
readme = Path("README.md")
11+
512

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:
815
external = []
916
internal = []
1017
for package in f.read().splitlines():
@@ -15,11 +22,15 @@ def classification_dependencies():
1522
return external, internal
1623

1724

18-
with open("README.md", "r", encoding="utf-8") as fh:
25+
with readme.open("r", encoding="utf-8") as fh:
1926
long_description = fh.read()
2027

2128
external, internal = classification_dependencies()
2229

30+
# remove old dist version
31+
32+
shutil.rmtree("dist", ignore_errors=True)
33+
2334
setup(
2435
name="mkdocs_embed_file_plugins",
2536
python_requires=">=3.7",
@@ -38,15 +49,10 @@ def classification_dependencies():
3849
"Topic :: Text Processing :: Markup :: Markdown",
3950
"License :: OSI Approved :: GNU Affero General Public License v3 or later"
4051
" (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",
4652
],
4753
long_description=long_description,
4854
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",
5056
entry_points={
5157
"mkdocs.plugins": ["embed_file=mkdocs_embed_file_plugins.plugin:EmbedFile"]
5258
},

0 commit comments

Comments
 (0)