Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Özgür Ozan Sen
ogs
Commits
791ae864
Verified
Commit
791ae864
authored
2 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[wheel] Get ogs version from env or git.
[ci] Upload wheel to GitLab registry.
parent
39ce500a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Applications/Python/OpenGeoSys/__init__.py
+1
-0
1 addition, 0 deletions
Applications/Python/OpenGeoSys/__init__.py
pyproject.toml
+1
-0
1 addition, 0 deletions
pyproject.toml
scripts/ci/jobs/build-wheels.yml
+6
-0
6 additions, 0 deletions
scripts/ci/jobs/build-wheels.yml
setup.py
+31
-1
31 additions, 1 deletion
setup.py
with
39 additions
and
1 deletion
Applications/Python/OpenGeoSys/__init__.py
+
1
−
0
View file @
791ae864
...
@@ -11,5 +11,6 @@ def _program(name, args):
...
@@ -11,5 +11,6 @@ def _program(name, args):
return
subprocess
.
call
([
os
.
path
.
join
(
OGS_BIN_DIR
,
name
)]
+
args
)
return
subprocess
.
call
([
os
.
path
.
join
(
OGS_BIN_DIR
,
name
)]
+
args
)
# Binary entrypoints
def
ogs
():
def
ogs
():
raise
SystemExit
(
_program
(
"
ogs
"
,
sys
.
argv
[
1
:]))
raise
SystemExit
(
_program
(
"
ogs
"
,
sys
.
argv
[
1
:]))
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
0
View file @
791ae864
...
@@ -22,3 +22,4 @@ build-verbosity = "1"
...
@@ -22,3 +22,4 @@ build-verbosity = "1"
[tool.cibuildwheel.linux]
[tool.cibuildwheel.linux]
manylinux-x86_64-image
=
"manylinux2014"
manylinux-x86_64-image
=
"manylinux2014"
manylinux-aarch64-image
=
"manylinux2014"
manylinux-aarch64-image
=
"manylinux2014"
environment-pass
=
[
"OGS_VERSION"
]
This diff is collapsed.
Click to expand it.
scripts/ci/jobs/build-wheels.yml
+
6
−
0
View file @
791ae864
...
@@ -4,6 +4,12 @@ build wheels linux:
...
@@ -4,6 +4,12 @@ build wheels linux:
tags
:
[
envinf3-shell
]
tags
:
[
envinf3-shell
]
script
:
script
:
-
pipx run cibuildwheel
-
pipx run cibuildwheel
-
>
pipx run twine upload
--repository-url https://gitlab.opengeosys.org/api/v4/projects/${CI_PROJECT_ID}/packages/pypi
--username gitlab-ci-token
--password ${CI_JOB_TOKEN}
wheelhouse/*
artifacts
:
artifacts
:
paths
:
paths
:
-
wheelhouse/
-
wheelhouse/
This diff is collapsed.
Click to expand it.
setup.py
+
31
−
1
View file @
791ae864
from
skbuild
import
setup
from
skbuild
import
setup
from
setuptools
import
find_packages
from
setuptools
import
find_packages
import
os
import
re
import
subprocess
def
get_version
():
git_version
=
""
if
"
OGS_VERSION
"
in
os
.
environ
:
git_version
=
os
.
environ
[
"
OGS_VERSION
"
]
else
:
git_version
=
subprocess
.
run
(
[
"
git describe --tags
"
],
capture_output
=
True
,
text
=
True
,
shell
=
True
,
).
stdout
.
strip
()
if
re
.
match
(
"
\d+\.\d+\.\d+-\d+-g\w+
"
,
git_version
):
# Make it PEP 440 compliant
# e.g. 6.4.2-1140-g85bbc8b4e1 -> 6.4.2.dev1140
m
=
re
.
match
(
"
.+?(?=-g[\w]*$)
"
,
git_version
)
# strip out commit hash
if
m
:
return
m
.
group
(
0
).
replace
(
"
-
"
,
"
.dev
"
)
# insert dev
else
:
print
(
"
WARNING: Could not get ogs version!
"
)
exit
(
1
)
else
:
return
git_version
setup
(
setup
(
name
=
"
OpenGeoSys
"
,
name
=
"
OpenGeoSys
"
,
version
=
"
6.4.2
"
,
version
=
get_version
()
,
description
=
"
OpenGeoSys
"
,
description
=
"
OpenGeoSys
"
,
author
=
"
OpenGeoSys Community
"
,
author
=
"
OpenGeoSys Community
"
,
license
=
"
BSD-3-Clause
"
,
license
=
"
BSD-3-Clause
"
,
...
...
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