makefile

Create powershell environment variables with makefile, and accessing them with python os.environ

Create powershell environment variables with makefile, and accessing them with python os.environ Question: With VSCode, I’m accessing to a python project that have a makefile like this: VARIABLES = VAR1="text1" VAR2="text2" VAR3="text3" .PHONY: run run: $(VARIABLES) poetry run python -m start.app I am on a windows machine, with "make" installed on powershell by chocholately. Launching …

Total answers: 1

unable to read makefile using python

unable to read makefile using python Question: I am trying to read the contents of the Makefile using python. Makefile # Dev Makefile SHELL := /bin/bash platform_ns ?= abc app_namespace ?= xyz wftmpl = wftmpl.yaml wftmpl_name ?= abc.yaml service_account ?= dev_account br_local_port = 8000 tr_local_port = 8001 storage_root_path ?= some_location I used the following code …

Total answers: 2

Running python interpreter in shell from a make file

Running python interpreter in shell from a make file Question: I want to call a python interpreter in a shell, from an android make file. Initially I tried this: $(shell python -c "import sys;print(‘hello’)") The result is an error: Android.mk:150: *** missing separator. Stop. I suspect this is caused by ndk-build misinterpreting nested quotes. I …

Total answers: 1

Calling python script in makefile run in Cygwin results in No Such File or Directory

Calling python script in makefile run in Cygwin results in No Such File or Directory Question: I am executing a Makefile in CYGWIN on Windows. The rule in the makefile calls a python script in another directory and passes arguments. Here is the rule in the makefile: $(OUTDIR)/toolchain: $(NDK_PATH)/build/tools/make_standalone_toolchain.py –api=24 –arch=arm64 –install-dir=$@ –verbose=2 The output …

Total answers: 1

use 'pip install psutil' on docker image python:3.9.13-alpine3.16 error: linux/ethtool.h not found

use 'pip install psutil' on docker image python:3.9.13-alpine3.16 error: linux/ethtool.h not found Question: I tried to install python module psutil in docker python:3.9.13-alpine3.16 But it reported the following mistake: Building wheels for collected packages: psutil Building wheel for psutil (pyproject.toml) … error error: subprocess-exited-with-error × Building wheel for psutil (pyproject.toml) did not run successfully. │ …

Total answers: 1

Symlink (auto-generated) directories via Snakemake

Symlink (auto-generated) directories via Snakemake Question: I am trying to create a symlink-directory structure for aliasing output directories in a Snakemake workflow. Let’s consider the following example: A long time ago in a galaxy far, far away, somebody wanted to find the best ice cream flavour in the universe and conducted a survey. Our example …

Total answers: 2

Whats the equivalent of Makefile's include for SConstruct?

Whats the equivalent of Makefile's include for SConstruct? Question: I’m trying find the best way to replicate Makefile’s include in SConstruct. I have come up with a solution, but its messy, relies of the user passing in specific command-line parameters and surely can’t be the best option. My file structure is as so: Working_Dir/ |-> …

Total answers: 1

pytest using Makefile and make command

pytest using Makefile and make command Question: I am learning Test Driven development for the first time. I have no experience of software development, but have some experience with scripting. I have been following LinuxAcademy Python 3 for Sys Admin tutorial. I created the following structure, ├── Makefile ├── Pipfile ├── Pipfile.lock ├── README.rst ├── …

Total answers: 1

Run Makefile on pip install

Run Makefile on pip install Question: I have some protocol buffer definitions which need to be built to Python source as part of the pip install process. I’ve subclassed the setuptools.command.install command in setup.py but I think it’s trying to run the Makefile after the package is installed so the sources aren’t recognised. I can’t …

Total answers: 1

Make (install from source) python without running tests

Make (install from source) python without running tests Question: I compiling python from source tar. All works good, but tests running 2 hours and two times. How to bypass these tests? 0:16:20 [178/405] test_inspect 0:16:26 [179/405] test_int 0:16:27 [180/405] test_int_literal 0:16:27 [181/405] test_io 0:18:18 [182/405] test_ioctl — test_io passed in 1 min 51 sec 0:18:19 …

Total answers: 6