Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
teqp_fork_old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Michael Pohl
teqp_fork_old
Commits
cad4c6f6
Commit
cad4c6f6
authored
3 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Invert logic so python reads C++ header rather than vice-versa
parent
c635b59c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/teqpversion.hpp
+2
-0
2 additions, 0 deletions
interface/teqpversion.hpp
setup.py
+7
-3
7 additions, 3 deletions
setup.py
with
9 additions
and
3 deletions
interface/teqpversion.hpp
0 → 100644
+
2
−
0
View file @
cad4c6f6
#include
<string>
const
std
::
string
TEQPVERSION
=
"0.3.1.dev"
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
7
−
3
View file @
cad4c6f6
...
@@ -6,14 +6,18 @@ import sys
...
@@ -6,14 +6,18 @@ import sys
import
platform
import
platform
import
subprocess
import
subprocess
import
shutil
import
shutil
import
re
from
setuptools
import
setup
,
Extension
from
setuptools
import
setup
,
Extension
from
setuptools.command.build_ext
import
build_ext
from
setuptools.command.build_ext
import
build_ext
from
distutils.version
import
LooseVersion
from
distutils.version
import
LooseVersion
VERSION
=
'
0.3.1.dev
'
# VERSION is now read from teqpversion.hpp header file
with
open
(
'
interface/teqpversion.hpp
'
,
'
w
'
)
as
fpver
:
match
=
re
.
search
(
r
'
TEQPVERSION = \"([0-9a-z.]+)\"\;
'
,
open
(
'
interface/teqpversion.hpp
'
).
read
())
fpver
.
write
(
f
'
#include <string>
\n
const std::string TEQPVERSION =
"
{
VERSION
}
"
;
'
)
if
match
!=
1
:
VERSION
=
match
.
group
(
1
)
else
:
raise
ValueError
(
"
Unable to parse version string from interface/teqpversion.hpp
"
)
here
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
here
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment