| 6 Nov 2023 |
matthewcroughan | * Now, this, I don't understand
python3.11-cmake> -- Detecting CXX compiler ABI info - done
python3.11-cmake> -- Check for working CXX compiler: /nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin/g++ - skipped
python3.11-cmake> -- Detecting CXX compile features
python3.11-cmake> -- Detecting CXX compile features - done
python3.11-cmake> -- ***************************************************
python3.11-cmake> -- Build CMake from source: ON
python3.11-cmake> -- ***************************************************
python3.11-cmake> CMake Warning (dev) at /nix/store/5h0akwq4cwlc3yp92i84nfgcxpv5xv79-cmake-3.26.4/share/cmake-3.26/Modules/ExternalProj
python3.11-cmake> The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
python3.11-cmake> not set. The policy's OLD behavior will be used. When using a URL
python3.11-cmake> download, the timestamps of extracted files should preferably be that of
python3.11-cmake> the time of extraction, otherwise code that depends on the extracted
python3.11-cmake> contents might not be rebuilt if the URL changes. The OLD behavior
python3.11-cmake> preserves the timestamps from the archive instead, but this is usually not
python3.11-cmake> what you want. Update your project to the NEW behavior or specify the
python3.11-cmake> DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
python3.11-cmake> robustness issue.
python3.11-cmake> Call Stack (most recent call first):
python3.11-cmake> /nix/store/5h0akwq4cwlc3yp92i84nfgcxpv5xv79-cmake-3.26.4/share/cmake-3.26/Modules/ExternalProject.cmake:4208 (_ep_add_download_command)
python3.11-cmake> CMakeLists.txt:138 (ExternalProject_add)
python3.11-cmake> This warning is for project developers. Use -Wno-dev to suppress it.
python3.11-cmake>
python3.11-cmake> -- SuperBuild - CMakeProject-src-download
python3.11-cmake> -- SuperBuild - CMakeProject-src-download - URL: https://github.com/Kitware/CMake/releases/download/v3.27.7/cmake-3.27.7.tar.gz
python3.11-cmake> -- SuperBuild - CMakeProject-src-download - CMakeProject_SOURCE_DIR: /build/cmake-3.27.7/CMake-src
python3.11-cmake> -- Looking for __GLIBC__
python3.11-cmake> -- Looking for __GLIBC__ - found
python3.11-cmake> -- Looking for __GLIBC_MINOR__
python3.11-cmake> -- Looking for __GLIBC_MINOR__ - found
python3.11-cmake> CMake Error at CMakeLists.txt:185 (message):
python3.11-cmake> GLIBC #pragma GCC diagnostic push
python3.11-cmake> #pragma GCC diagnostic ignored "-Wcast-qual"
python3.11-cmake> #pragma GCC diagnostic pop
python3.11-cmake> 2.#pragma GCC diagnostic push
python3.11-cmake> #pragma GCC diagnostic ignored "-Wcast-qual"
python3.11-cmake> #pragma GCC diagnostic pop
python3.11-cmake> 38 not supported
python3.11-cmake>
python3.11-cmake> -- Configuring incomplete, errors occurred!
| 20:27:24 |
matthewcroughan | It happens so often in poetry2nix that there is a nix package already made for the thing that works, but it cannot be shared with poetry2nix | 20:28:39 |
K900 | That's just objectively not true | 20:28:55 |
K900 | poetry2nix applies its overrides on top of the nixpkgs ones | 20:29:00 |
K900 | So anything done in nixpkgs should already be applied | 20:29:07 |
matthewcroughan | In reply to @k900:0upti.me poetry2nix applies its overrides on top of the nixpkgs ones then why can I not I redirect in the overrides | 20:29:22 |
K900 | Redirect what? | 20:29:28 |
matthewcroughan | In reply to @k900:0upti.me So anything done in nixpkgs should already be applied most of my override are undoing poetry2nix overrides | 20:29:36 |
K900 | You can just set cmake = python310Packages.cmake | 20:29:51 |
K900 | And it will work (until it inevitably blows up due to some version incompatibility) | 20:30:07 |
matthewcroughan | that's not true, because then I get collisions | 20:30:07 |
matthewcroughan | tokenizers = super.tokenizers.overridePythonAttrs
(
old: {
sourceRoot = "tokenizers-0.14.1/bindings/python";
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./nix/tokenizers/Cargo.lock;
};
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkgs.rustPlatform.cargoSetupHook
pkgs.rustPlatform.maturinBuildHook
];
}
);
| 20:30:11 |
matthewcroughan | take this for instance | 20:30:13 |
matthewcroughan | * tokenizers = super.tokenizers.overridePythonAttrs
(
old: {
sourceRoot = "tokenizers-0.14.1/bindings/python";
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./nix/tokenizers/Cargo.lock;
};
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkgs.rustPlatform.cargoSetupHook
pkgs.rustPlatform.maturinBuildHook
];
}
);
| 20:30:17 |
matthewcroughan | https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/tokenizers/default.nix#L140 | 20:30:31 |
matthewcroughan | already in nixpkgs | 20:30:33 |
matthewcroughan | but poetry2nix seems not to be using the nixpkgs derivation | 20:31:00 |
K900 | And? | 20:31:01 |
matthewcroughan | if I set it to the one from nixpkgs, that's not going to work | 20:31:22 |
K900 | https://github.com/nix-community/poetry2nix/blob/master/overrides/default.nix#L3148-L3154 is what it's doing | 20:31:23 |
matthewcroughan | it doesn't even use the wheel though | 20:31:47 |
matthewcroughan | hence why I have to override it | 20:31:53 |
K900 | It should work if you set it to the nixpkgs derivation | 20:32:33 |
K900 | Unless you're also leaking in some other version of it | 20:32:39 |
matthewcroughan | yeah I think the repo I'm packaging uses a newer version | 20:32:51 |
matthewcroughan | but is there no way to relax the deps like there is with nixpkgs infra? | 20:32:59 |
K900 | If you're already in that repo, you can just update the constraint | 20:33:22 |
K900 | If you're not, you can use pythonRelaxDepsHook | 20:33:30 |
matthewcroughan | python3.11-gradio-client> no configure script, doing nothing
python3.11-gradio-client> building
python3.11-gradio-client> Executing pipBuildPhase
python3.11-gradio-client> Creating a wheel...
python3.11-gradio-client> WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable
python3.11-gradio-client> Processing /build/gradio_client-0.6.1
python3.11-gradio-client> Running command Preparing metadata (pyproject.toml)
python3.11-gradio-client> Traceback (most recent call last):
python3.11-gradio-client> File "/nix/store/z41lyyssxy1gza6ngn44q036k213c9gm-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/
python3.11-gradio-client> main()
python3.11-gradio-client> File "/nix/store/z41lyyssxy1gza6ngn44q036k213c9gm-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/
python3.11-gradio-client> json_out['return_val'] = hook(**hook_input['kwargs'])
python3.11-gradio-client> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/z41lyyssxy1gza6ngn44q036k213c9gm-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/
python3.11-gradio-client> whl_basename = backend.build_wheel(metadata_directory, config_settings)
python3.11-gradio-client> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-package
python3.11-gradio-client> return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
python3.11-gradio-client> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-package
python3.11-gradio-client> self.metadata.validate_fields()
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line 243, in validate_fields
python3.11-gradio-client> _ = self.version
python3.11-gradio-client> ^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line 128, in version
python3.11-gradio-client> self._version = self._get_version()
python3.11-gradio-client> ^^^^^^^^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line 222, in _get_version
python3.11-gradio-client> core_metadata = self.core
python3.11-gradio-client> ^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line 166, in core
python3.11-gradio-client> metadata_hooks = self.hatch.metadata.hooks
python3.11-gradio-client> ^^^^^^^^^^^^^^^^^^^^^^^^^
python3.11-gradio-client> File "/nix/store/rralcg7v1b4x03ll78r4s84c475xaygm-python3.11-hatchling-1.18.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line 1544, in hooks
python3.11-gradio-client> raise UnknownPluginError(message)
python3.11-gradio-client> hatchling.plugin.exceptions.UnknownPluginError: Unknown metadata hook: requirements_txt
| 20:37:45 |
matthewcroughan | And now my favourite part, patching out random lines for no apparent reason because who knows how hatchling works | 20:37:58 |