Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dz-ci-prototype
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
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
poquet
dz-ci-prototype
Commits
7bab6d38
Commit
7bab6d38
authored
2 years ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
package python protocol
parent
1aa33178
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
default.nix
+3
-8
3 additions, 8 deletions
default.nix
protocol/setup.py
+33
-0
33 additions, 0 deletions
protocol/setup.py
with
36 additions
and
8 deletions
default.nix
+
3
−
8
View file @
7bab6d38
...
@@ -24,21 +24,16 @@ let self = rec {
...
@@ -24,21 +24,16 @@ let self = rec {
ninja
ninja
];
];
};
};
protocol-python
=
pkgs
.
stdenv
.
mkDerivation
{
protocol-python
=
pythonPackages
.
buildPythonPackage
{
pname
=
"protocol-python"
;
name
=
"protocol-python-0.1.0"
;
version
=
"local"
;
src
=
pkgs
.
lib
.
sourceByRegex
./protocol
[
src
=
pkgs
.
lib
.
sourceByRegex
./protocol
[
"hello
\.
proto"
"hello
\.
proto"
"setup
\.
py"
];
];
propagatedBuildInputs
=
[
propagatedBuildInputs
=
[
pkgs
.
protobuf
pkgs
.
protobuf
pythonPackages
.
protobuf
pythonPackages
.
protobuf
];
];
phases
=
[
"unpackPhase"
"buildPhase"
];
buildPhase
=
''
mkdir -p $out/lib/python
${
pkgs
.
lib
.
versions
.
majorMinor
python3
.
version
}
/site-packages/protocol
protoc --python_out $out/lib/python
${
pkgs
.
lib
.
versions
.
majorMinor
python3
.
version
}
/site-packages/protocol hello.proto
''
;
};
};
simgrid-simulator
=
pkgs
.
stdenv
.
mkDerivation
{
simgrid-simulator
=
pkgs
.
stdenv
.
mkDerivation
{
pname
=
"simgrid-simulator"
;
pname
=
"simgrid-simulator"
;
...
...
This diff is collapsed.
Click to expand it.
protocol/setup.py
0 → 100644
+
33
−
0
View file @
7bab6d38
#!/usr/bin/env python
from
distutils.core
import
setup
from
distutils.spawn
import
find_executable
from
os
import
makedirs
import
subprocess
import
sys
protoc
=
find_executable
(
'
protoc
'
)
makedirs
(
'
protocol
'
,
exist_ok
=
True
)
protoc_command
=
[
protoc
,
'
--python_out=protocol
'
,
'
hello.proto
'
]
if
subprocess
.
call
(
protoc_command
)
!=
0
:
sys
.
exit
(
1
)
setup
(
name
=
'
protocol
'
,
version
=
'
0.1.0
'
,
packages
=
[
'
protocol
'
],
python_requires
=
'
>=3.6
'
,
install_requires
=
[
'
protobuf>=3.19.4
'
,
],
description
=
"
Example python protocol library for DZ2 toy CI prototype.
"
,
author
=
'
Millian Poquet
'
,
author_email
=
'
millian.poquet@irit.fr
'
,
url
=
'
https://gitlab.irit.fr/sepia/datazero/ci-prototype
'
,
license
=
'
MIT
'
,
classifiers
=
[
"
Programming Language :: Python :: 3
"
,
"
License :: OSI Approved :: MIT License
"
,
],
)
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