Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aidge_core
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
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Houssem ROUIS
aidge_core
Commits
a5b7b942
Commit
a5b7b942
authored
11 months ago
by
Grégoire Kubler
Browse files
Options
Downloads
Patches
Plain Diff
fix: setup.py now functions with name from pyproject.toml + fixed script .ps1 for aidge core
parent
2968bd74
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
+5
-5
5 additions, 5 deletions
.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
pyproject.toml
+16
-12
16 additions, 12 deletions
pyproject.toml
setup.py
+6
-7
6 additions, 7 deletions
setup.py
with
27 additions
and
24 deletions
.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
+
5
−
5
View file @
a5b7b942
if
(
$
env
:
AIDGE_DEPENDENCIES
.
Length
-split
" "
-eq
0
)
{
if
(
$
(
$
env
:
AIDGE_DEPENDENCIES
-split
" "
)
.
Length
-eq
0
)
{
Write-Host
"- No dependencies provided for current repsitory"
Write-Host
"- No dependencies provided for current repsitory"
New-Item
-ItemType
Directory
-Force
-Path
".\build"
|
Out-Null
New-Item
-ItemType
Directory
-Force
-Path
".\build"
|
Out-Null
Remove-Item
-Path
".\build\*"
-Recurse
-Force
Remove-Item
-Path
".\build\*"
-Recurse
-Force
}
else
{
}
else
{
Write-Host
"Retrieving given dependencies to build current package :
$(
$deps
-join
','
)
"
Write-Host
"Retrieving given dependencies to build current package :
$
env
:
AIDGE_DEPENDENCIES
"
foreach
(
$dep
in
$
env
:
AIDGE_DEPENDENCIES
-split
" "
)
{
foreach
(
$dep
in
$
(
$
env
:
AIDGE_DEPENDENCIES
-split
" "
))
{
Write-Host
"Retrieving :
$dep
"
Write-Host
"Retrieving :
$dep
"
$dep_path
=
Get-ChildItem
-Path
"/host/home/"
-Directory
-Filter
$dep
-Recurse
|
$dep_path
=
Get-ChildItem
-Path
"/host/home/"
-Directory
-Filter
$dep
-Recurse
|
Where-Object
{
$_
.
FullName
-notmatch
'install'
-and
Where-Object
{
$_
.
FullName
-notmatch
'install'
-and
...
@@ -23,7 +23,7 @@ if ($env:AIDGE_DEPENDENCIES.Length -split " " -eq 0) {
...
@@ -23,7 +23,7 @@ if ($env:AIDGE_DEPENDENCIES.Length -split " " -eq 0) {
New-Item
-Path
".\build"
-ItemType
Directory
-Force
|
Out-Null
New-Item
-Path
".\build"
-ItemType
Directory
-Force
|
Out-Null
Get-ChildItem
-Path
".\build"
-File
|
Remove-Item
-Force
Get-ChildItem
-Path
".\build"
-File
|
Remove-Item
-Force
pip
install
.
-Verbose
pip
install
.
-Verbose
}
else
{
}
else
{
throw
"
$dep
not found, aborting."
throw
"
$dep
not found, aborting."
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
16
−
12
View file @
a5b7b942
...
@@ -12,15 +12,28 @@ classifiers = [
...
@@ -12,15 +12,28 @@ classifiers = [
dynamic
=
[
"version"
]
# defined in tool.setuptools_scm
dynamic
=
[
"version"
]
# defined in tool.setuptools_scm
[build-system]
[build-system]
requires
=
["setuptools>
=
68
", "
setuptools-scm
", "
cmake
"]
requires
=
[
"setuptools>
=
64
",
"setuptools_scm[toml]=
=
7.1
.
0
",
"cmake"
,
"toml"
]
build-backend
=
"setuptools.build_meta"
build-backend
=
"setuptools.build_meta"
#####################################################
# SETUPTOOLS
[tool.setuptools]
#####################################################
# SETUPTOOLS_SCM
[tool.setuptools_scm]
write_to
=
"aidge_core/_version.py"
#####################################################
#####################################################
# CIBUILDWHEEL
# CIBUILDWHEEL
[tool.cibuildwheel]
[tool.cibuildwheel]
build-frontend
=
"build"
build-frontend
=
"build"
###########
### AIDGE DEPENDENCIES DECLARATION
### AIDGE DEPENDENCIES DECLARATION
# aidge_core do not rely on any aidge dependency, hence this string is empty
# aidge_core do not rely on any aidge dependency, hence this string is empty
[tool.cibuildwheel.linux.environment]
[tool.cibuildwheel.linux.environment]
# AIDGE_DEPENDENCIES = "" # format => "dep_1 dep_2 ... dep_n"
# AIDGE_DEPENDENCIES = "" # format => "dep_1 dep_2 ... dep_n"
...
@@ -29,22 +42,13 @@ build-frontend = "build"
...
@@ -29,22 +42,13 @@ build-frontend = "build"
[tool.cibuildwheel.linux]
[tool.cibuildwheel.linux]
before-build
=
[
before-build
=
[
'echo "dependencies to retrieve : ${AIDGE_DEPENDENCIES}"'
,
"bash .gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh ${AIDGE_DEPENDENCIES}"
"bash .gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh ${AIDGE_DEPENDENCIES}"
]
]
[tool.cibuildwheel.windows]
[tool.cibuildwheel.windows]
before-build
=
[
before-build
=
[
'Write-Host "dependencies to retrieve : $env:{AIDGE_DEPENDENCIES}"'
,
"powershell -File .
\\
.gitlab
\\
ci
\\
cibuildwheel_build_deps_before_build_wheel.ps1"
".
\\
.gitlab
\\
ci
\\
cibuildwheel_build_deps_before_build_wheel.ps1"
]
]
#####################################################
# SETUPTOOLS
[tool.setuptools]
# packages=["aidge_core", "export"]
[tool.setuptools_scm]
version_file
=
"_version.py"
#####################################################
#####################################################
# PYLINT
# PYLINT
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
6
−
7
View file @
a5b7b942
...
@@ -9,19 +9,18 @@ import multiprocessing
...
@@ -9,19 +9,18 @@ import multiprocessing
from
math
import
ceil
from
math
import
ceil
import
toml
from
setuptools
import
setup
,
Extension
from
setuptools
import
setup
,
Extension
from
setuptools
import
find_packages
from
setuptools
import
find_packages
from
setuptools.command.build_ext
import
build_ext
from
setuptools.command.build_ext
import
build_ext
def
get_project_name
()
->
str
:
def
get_project_name
()
->
str
:
return
open
(
pathlib
.
Path
().
absolute
()
/
"
project_name.txt
"
,
"
r
"
).
read
()
with
open
(
pathlib
.
Path
().
absolute
()
/
"
pyproject.toml
"
,
"
r
"
)
as
file
:
project_toml
=
toml
.
load
(
file
)
print
(
f
"
project_name =
{
project_toml
[
"
project
"
][
"
name
"
]
}
"
)
return
project_toml
[
"
project
"
][
"
name
"
]
def
get_project_version
()
->
str
:
aidge_root
=
pathlib
.
Path
().
absolute
()
version
=
open
(
aidge_root
/
"
version.txt
"
,
"
r
"
).
read
().
strip
()
return
version
class
CMakeExtension
(
Extension
):
class
CMakeExtension
(
Extension
):
...
...
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