File tree
Expand file treeCollapse file tree1 file changed
+16
-6
lines changed Expand file treeCollapse file tree1 file changed
+16
-6
lines changed Original file line number | Diff line number | Diff line change |
---|
|
1 |
| -from pathlib import Path |
2 |
| -from setuptools import setup |
| 1 | +import re |
3 | 2 | import sdist_upip
|
| 3 | +from setuptools import setup |
4 | 4 |
|
| 5 | +VERSION = "1.0.0" |
5 | 6 |
|
6 |
| -HERE = Path(__file__).parent |
7 |
| -README = (HERE / 'README.rst').read_text() |
8 | 7 |
|
9 |
| -VERSION = "1.0.0" |
| 8 | +def long_desc_from_readme(): |
| 9 | +with open('README.rst', 'r') as fd: |
| 10 | +long_description = fd.read() |
| 11 | + |
| 12 | +# remove badges |
| 13 | +long_description = re.compile(r'^\.\. start-badges.*^\.\. end-badges', re.M | re.S).sub('', long_description) |
| 14 | + |
| 15 | +# strip links. keep link name and use literal text formatting |
| 16 | +long_description = re.sub(r'`([^<`]+) </[^>]+>`_', '``\\1``', long_description) |
| 17 | + |
| 18 | +return long_description |
| 19 | + |
10 | 20 |
|
11 | 21 | setup(
|
12 | 22 | name="micropython-py-esp32-ulp",
|
13 | 23 | version=VERSION,
|
14 | 24 | description="Assembler toolchain for the ESP32 ULP co-processor, written in MicroPython",
|
15 |
| -long_description=README, |
| 25 | +long_description=long_desc_from_readme(), |
16 | 26 | long_description_content_type='text/x-rst',
|
17 | 27 | url="https://.com/ThomasWaldmann/py-esp32-ulp",
|
18 | 28 | license="MIT",
|
|
You can’t perform that action at this time.
0 commit comments