moving to typical python project setup
parent
9468de17d1
commit
f6ad4c4ab9
|
@ -0,0 +1 @@
|
||||||
|
.sconsign.dblite
|
|
@ -1,15 +1,16 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, stdenvNoCC
|
, buildPythonPackage
|
||||||
, python3
|
, scons
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
buildPythonPackage {
|
||||||
pname = "kel_project_template";
|
pname = "kel_project_template";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
scons
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env scons
|
||||||
|
|
||||||
|
import os;
|
||||||
|
|
||||||
|
|
||||||
|
def isAbsolutePath(key, dirname, env):
|
||||||
|
assert os.path.isabs(dirname), "%r must have absolute path syntax" % (key,);
|
||||||
|
|
||||||
|
env_vars = Variables(args=ARGUMENTS);
|
||||||
|
|
||||||
|
env_vars.Add('prefix',
|
||||||
|
default='/usr/local',
|
||||||
|
validator=isAbsolutePath
|
||||||
|
);
|
||||||
|
|
||||||
|
env = Environment(ENV=os.environ, variables=env_vars);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Export('env');
|
||||||
|
|
||||||
|
SConscript('src/SConscript');
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
pkgs.callPackage ./.nix/derivation.nix {}
|
|
@ -0,0 +1,11 @@
|
||||||
|
# setup.py
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='cppSconsTemplate',
|
||||||
|
version='0.0.0',
|
||||||
|
scripts=['cppSconsInit.py',],
|
||||||
|
);
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ with import <nixpkgs> {};
|
||||||
pkgs.mkShellNoCC {
|
pkgs.mkShellNoCC {
|
||||||
name = "kel_project_template";
|
name = "kel_project_template";
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
scons
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env false
|
||||||
|
|
||||||
|
import os;
|
||||||
|
import os.path;
|
||||||
|
import glob;
|
||||||
|
|
||||||
|
|
||||||
|
Import('env');
|
||||||
|
|
||||||
|
dir_path = Dir('.').abspath;
|
||||||
|
env.scripts = sorted(glob.glob(dir_path + "/*.py"));
|
||||||
|
|
||||||
|
env.Install('$prefix/bin/', [env.scripts]);
|
||||||
|
|
||||||
|
env.Alias('install', '$prefix');
|
Loading…
Reference in New Issue