Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flatlatex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leger
flatlatex
Commits
46378b21
Commit
46378b21
authored
Jan 01, 2017
by
Matthias Bussonnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract info from __init__ via .exec
parent
35b11360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
setup.py
setup.py
+10
-16
No files found.
setup.py
View file @
46378b21
...
...
@@ -19,22 +19,16 @@ here = path.abspath(path.dirname(__file__))
# garder le `__doc__`, tu peux en profiter pour attraper le `__version__` en
# meme temps.
###
with
open
(
path
.
join
(
here
,
'flatlatex/__init__.py'
),
encoding
=
'utf-8'
)
as
f
:
long_description
=
''
ok
=
False
while
True
:
s
=
f
.
readline
()
if
s
is
None
:
break
if
ok
:
if
s
[
0
:
3
]
==
'"""'
:
break
else
:
long_description
+=
s
else
:
if
s
[
0
:
3
]
==
'"""'
:
ok
=
True
with
open
(
path
.
join
(
here
,
'flatlatex'
,
'__init__.py'
),
encoding
=
'utf-8'
)
as
f
:
ast
=
compile
(
f
.
read
(),
'__init__.py'
,
'exec'
)
fake_global
=
{
'__name__'
:
'__main__'
}
try
:
exec
(
ast
,
fake_global
)
except
(
SystemError
,
ImportError
)
as
e
:
print
(
'System error'
)
long_description
=
fake_global
[
'__doc__'
]
version
=
fake_global
[
'__version__'
]
setup
(
...
...
@@ -43,7 +37,7 @@ setup(
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version
=
'0.1'
,
version
=
version
,
description
=
'A LaTeX math converter to unicode text'
,
long_description
=
long_description
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment