|
1 | | -frompathlibimportPath |
2 | | -fromsetuptoolsimportsetup |
| 1 | +importre |
3 | 2 | importsdist_upip |
| 3 | +fromsetuptoolsimportsetup |
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 | +deflong_desc_from_readme(): |
| 9 | +withopen('README.rst','r')asfd: |
| 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 | +returnlong_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://github.com/ThomasWaldmann/py-esp32-ulp", |
18 | 28 | license="MIT", |
|