allyourcodebase / allyourcodebase/cpython

Changes required for > v0.14.0?

Đang mở
#8 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Zig
Star
19
Fork
7
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I want to pull in this dependency in my project so my program can ingest python scripts and run them with some behaviour added. But just trying to get a basic version of this dependency pulled in on zig `v0.15.1` doesn't work. Here is the basic and relevant examples:

`build.zig.zon`:
```
.{
.minimum_zig_version = "0.15.1",
.dependencies = .{
.cpython = .{
.url = "git+https://github.com/allyourcodebase/cpython.git#b9871b745dd11dd9b08e7ad1c8493403149a6f08",
.hash = "cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD",
},
},
}
```

`build.zig`:
```zig
const std = @import("std");

pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

const cpython_dep = b.dependency("cpython", .{
.target = target,
.optimize = optimize,
});
const cpython_module = cpython_dep.module("cpython");

const exe = b.addExecutable(.{
.name = "testing",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
}),
});

exe.root_module.addImport("cpython", cpython_module);

b.installArtifact(exe);
}
```

the command im running and zig version:
```
ash@minty:~/git/personal/testing$ zig version
0.15.1
ash@minty:~/git/personal/testing$ zig build -Dtarget=x86_64-linux-musl
/home/ash/.cache/zig/p/cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD/build.zig:1238:22: error: no field named 'autoconf' in union 'Build.Step.ConfigHeader.Style'
.style = .{ .autoconf = upstream.path("pyconfig.h.in") },
^~~~~~~~
/usr/local/zig/lib/std/Build/Step/ConfigHeader.zig:7:19: note: union declared here
pub const Style = union(enum) {
^~~~~
referenced by:
build: /home/ash/.cache/zig/p/cpython-0.0.0-FN2rG3bEAQBfgfSVEVG1RkY4uwykTHwl6wM2gOD9xHMD/build.zig:96:42
runBuild__anon_76637: /usr/local/zig/lib/std/Build.zig:2215:44
10 reference(s) hidden; use '-freference-trace=12' to see all references
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: error: no field or member function named 'addStaticLibrary' in 'Build'
const lib = b.addStaticLibrary(.{
~^~~~~~~~~~~~~~~~~
/usr/local/zig/lib/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: note: method invocation only supports up to one level of implicit pointer dereferencing
/home/ash/.cache/zig/p/zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h/build.zig:5:18: note: use '.*' to dereference pointer
```

If this is something different and this is actually a me problem i apologise but would very much appreciate you pointing me in the right direction. I have not been able to figure this out and grok is suggesting is incompatibility with my zig version.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.