File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
from .main import MarkdownIt # noqa: F401
2
2
3
3
4
- __version__ = "0.1.0 "
4
+ __version__ = "0.1.1 "
Original file line number Diff line number Diff line change 1
1
# from importlib import import_module
2
-
2
+ from pathlib import Path
3
+ import re
3
4
from setuptools import find_packages , setup
4
5
5
6
7
+ def get_version ():
8
+ text = Path (__file__ ).parent .joinpath ("markdown_it" , "__init__.py" ).read_text ()
9
+ match = re .compile (r"^__version__\s*\=\s*([^\s]+)" , re .M ).search (text )
10
+ return match .group (1 )
11
+
12
+
6
13
setup (
7
14
name = "markdown-it-py" ,
8
- version = "0.1.0" , # import_module("markdown_it").__version__, TODO fix this
15
+ version = get_version () , # import_module("markdown_it").__version__, TODO fix this
9
16
description = "PYthon port of mardown-it. Markdown parser, done right." ,
10
17
long_description = open ("README.md" ).read (),
11
18
long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments