diff --git a/crates/pixi_build_types/src/procedures/conda_build.rs b/crates/pixi_build_types/src/procedures/conda_build.rs index f629d168f..63e33dfd5 100644 --- a/crates/pixi_build_types/src/procedures/conda_build.rs +++ b/crates/pixi_build_types/src/procedures/conda_build.rs @@ -43,6 +43,10 @@ pub struct CondaBuildParams { /// /// The directory may not yet exist. pub work_directory: PathBuf, + + /// Whether we want to install the package as editable + // TODO: remove this parameter as soon as we have profiles + pub editable: bool, } /// Identifier of an output. diff --git a/src/build/mod.rs b/src/build/mod.rs index 80dcdf56f..bf2172e39 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -266,6 +266,8 @@ impl BuildContext { channel_configuration: ChannelConfiguration { base_url: self.channel_config.channel_alias.clone(), }, + // TODO: only build path dependencies + editable: true, outputs: Some(vec![CondaOutputIdentifier { name: Some(source_spec.package_record.name.as_normalized().to_string()), version: Some(source_spec.package_record.version.version().to_string()), diff --git a/src/cli/build.rs b/src/cli/build.rs index 8760f5623..c309925f7 100644 --- a/src/cli/build.rs +++ b/src/cli/build.rs @@ -165,6 +165,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { base_url: channel_config.channel_alias, }, outputs: None, + editable: false, work_directory: work_dir.path().to_path_buf(), variant_configuration: Some(Default::default()), }, diff --git a/src/lock_file/update.rs b/src/lock_file/update.rs index 3021e99e8..1fdc30529 100644 --- a/src/lock_file/update.rs +++ b/src/lock_file/update.rs @@ -74,7 +74,7 @@ impl Project { &self, options: UpdateLockFileOptions, ) -> miette::Result> { - self::update_lock_file(self, options).await + update_lock_file(self, options).await } /// Get lockfile without checking diff --git a/tests/data/pixi_build/editable-pyproject/.gitignore b/tests/data/pixi_build/editable-pyproject/.gitignore new file mode 100644 index 000000000..e1dac7338 --- /dev/null +++ b/tests/data/pixi_build/editable-pyproject/.gitignore @@ -0,0 +1,2 @@ +.pixi +#*.egg-info diff --git a/tests/data/pixi_build/editable-pyproject/pixi.lock b/tests/data/pixi_build/editable-pyproject/pixi.lock new file mode 100644 index 000000000..584b1c8d6 --- /dev/null +++ b/tests/data/pixi_build/editable-pyproject/pixi.lock @@ -0,0 +1,772 @@ +version: 6 +environments: + default: + channels: + - url: https://prefix.dev/conda-forge/ + packages: + linux-64: + - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + - conda: https://prefix.dev/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_2.conda + - conda: https://prefix.dev/conda-forge/linux-64/libexpat-2.6.4-h5888daf_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/libsqlite-3.47.0-hadc24fc_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + - conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-he02047a_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/openssl-3.4.0-hb9d3cd8_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/python-3.13.0-h9ebbce0_101_cp313.conda + - conda: https://prefix.dev/conda-forge/linux-64/python_abi-3.13-5_cp313.conda + - conda: https://prefix.dev/conda-forge/linux-64/readline-8.2-h8228510_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + - conda: https://prefix.dev/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + - conda: . + osx-64: + - conda: https://prefix.dev/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda + - conda: https://prefix.dev/conda-forge/osx-64/ca-certificates-2024.8.30-h8857fd0_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/libexpat-2.6.4-h240833e_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 + - conda: https://prefix.dev/conda-forge/osx-64/libmpdec-4.0.0-hfdf4475_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/libsqlite-3.47.0-h2f8c449_1.conda + - conda: https://prefix.dev/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-hf036a51_1.conda + - conda: https://prefix.dev/conda-forge/osx-64/openssl-3.4.0-hd471939_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/python-3.13.0-h3a8ca6c_101_cp313.conda + - conda: https://prefix.dev/conda-forge/osx-64/python_abi-3.13-5_cp313.conda + - conda: https://prefix.dev/conda-forge/osx-64/readline-8.2-h9e318b2_1.conda + - conda: https://prefix.dev/conda-forge/osx-64/tk-8.6.13-h1abcd95_1.conda + - conda: https://prefix.dev/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 + - conda: . + osx-arm64: + - conda: https://prefix.dev/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/ca-certificates-2024.8.30-hf0a4a13_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/libexpat-2.6.4-h286801f_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/libffi-3.4.2-h3422bc3_5.tar.bz2 + - conda: https://prefix.dev/conda-forge/osx-arm64/libmpdec-4.0.0-h99b78c6_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/libsqlite-3.47.0-hbaaea75_1.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/libzlib-1.3.1-h8359307_2.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h7bae524_1.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/openssl-3.4.0-h39f12f2_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/python-3.13.0-hbbac1ca_101_cp313.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/python_abi-3.13-5_cp313.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/readline-8.2-h92ec313_1.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/tk-8.6.13-h5083fa2_1.conda + - conda: https://prefix.dev/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/xz-5.2.6-h57fd34a_0.tar.bz2 + - conda: . + win-64: + - conda: https://prefix.dev/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda + - conda: https://prefix.dev/conda-forge/win-64/ca-certificates-2024.8.30-h56e8100_0.conda + - conda: https://prefix.dev/conda-forge/win-64/libexpat-2.6.4-he0c23c2_0.conda + - conda: https://prefix.dev/conda-forge/win-64/libffi-3.4.2-h8ffe710_5.tar.bz2 + - conda: https://prefix.dev/conda-forge/win-64/libmpdec-4.0.0-h2466b09_0.conda + - conda: https://prefix.dev/conda-forge/win-64/libsqlite-3.47.0-h2466b09_1.conda + - conda: https://prefix.dev/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + - conda: https://prefix.dev/conda-forge/win-64/openssl-3.4.0-h2466b09_0.conda + - conda: https://prefix.dev/conda-forge/win-64/python-3.13.0-hf5aa216_101_cp313.conda + - conda: https://prefix.dev/conda-forge/win-64/python_abi-3.13-5_cp313.conda + - conda: https://prefix.dev/conda-forge/win-64/tk-8.6.13-h5226925_1.conda + - conda: https://prefix.dev/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://prefix.dev/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + - conda: https://prefix.dev/conda-forge/win-64/vc-14.3-ha32ba9b_23.conda + - conda: https://prefix.dev/conda-forge/win-64/vc14_runtime-14.42.34433-he29a5d6_23.conda + - conda: https://prefix.dev/conda-forge/win-64/vs2015_runtime-14.42.34433-hdffcdeb_23.conda + - conda: https://prefix.dev/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2 + - conda: . +packages: +- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d + md5: 62ee74e96c5ebb0af99386de58cf9553 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: bzip2-1.0.6 + license_family: BSD + size: 252783 + timestamp: 1720974456583 +- conda: https://prefix.dev/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda + sha256: cad153608b81fb24fc8c509357daa9ae4e49dfc535b2cb49b91e23dbd68fc3c5 + md5: 7ed4301d437b59045be7e051a0308211 + depends: + - __osx >=10.13 + license: bzip2-1.0.6 + license_family: BSD + size: 134188 + timestamp: 1720974491916 +- conda: https://prefix.dev/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda + sha256: adfa71f158cbd872a36394c56c3568e6034aa55c623634b37a4836bd036e6b91 + md5: fc6948412dbbbe9a4c9ddbbcfe0a79ab + depends: + - __osx >=11.0 + license: bzip2-1.0.6 + license_family: BSD + size: 122909 + timestamp: 1720974522888 +- conda: https://prefix.dev/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda + sha256: 35a5dad92e88fdd7fc405e864ec239486f4f31eec229e31686e61a140a8e573b + md5: 276e7ffe9ffe39688abc665ef0f45596 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: bzip2-1.0.6 + license_family: BSD + size: 54927 + timestamp: 1720974860185 +- conda: https://prefix.dev/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea + md5: c27d1c142233b5bc9ca570c6e2e0c244 + license: ISC + size: 159003 + timestamp: 1725018903918 +- conda: https://prefix.dev/conda-forge/osx-64/ca-certificates-2024.8.30-h8857fd0_0.conda + sha256: 593f302d0f44c2c771e1614ee6d56fffdc7d616e6f187669c8b0e34ffce3e1ae + md5: b7e5424e7f06547a903d28e4651dbb21 + license: ISC + size: 158665 + timestamp: 1725019059295 +- conda: https://prefix.dev/conda-forge/osx-arm64/ca-certificates-2024.8.30-hf0a4a13_0.conda + sha256: 2db1733f4b644575dbbdd7994a8f338e6ef937f5ebdb74acd557e9dda0211709 + md5: 40dec13fd8348dbe303e57be74bd3d35 + license: ISC + size: 158482 + timestamp: 1725019034582 +- conda: https://prefix.dev/conda-forge/win-64/ca-certificates-2024.8.30-h56e8100_0.conda + sha256: 0fcac3a7ffcc556649e034a1802aedf795e64227eaa7194d207b01eaf26454c4 + md5: 4c4fd67c18619be5aa65dc5b6c72e490 + license: ISC + size: 158773 + timestamp: 1725019107649 +- conda: . + name: editable-pyproject + version: 0.1.0 + build: pyhbf21a9e_0 + subdir: noarch + depends: + - python + input: + hash: e2aeabaf6b81a2830a9736cab58074fa349bf18244acf4ef82050e4459199f36 + globs: + - pyproject.toml +- conda: https://prefix.dev/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_2.conda + sha256: 7c91cea91b13f4314d125d1bedb9d03a29ebbd5080ccdea70260363424646dbe + md5: 048b02e3962f066da18efe3a21b77672 + depends: + - __glibc >=2.17,<3.0.a0 + constrains: + - binutils_impl_linux-64 2.43 + license: GPL-3.0-only + license_family: GPL + size: 669211 + timestamp: 1729655358674 +- conda: https://prefix.dev/conda-forge/linux-64/libexpat-2.6.4-h5888daf_0.conda + sha256: 56541b98447b58e52d824bd59d6382d609e11de1f8adf20b23143e353d2b8d26 + md5: db833e03127376d461e1e13e76f09b6c + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - expat 2.6.4.* + license: MIT + license_family: MIT + size: 73304 + timestamp: 1730967041968 +- conda: https://prefix.dev/conda-forge/osx-64/libexpat-2.6.4-h240833e_0.conda + sha256: d10f43d0c5df6c8cf55259bce0fe14d2377eed625956cddce06f58827d288c59 + md5: 20307f4049a735a78a29073be1be2626 + depends: + - __osx >=10.13 + constrains: + - expat 2.6.4.* + license: MIT + license_family: MIT + size: 70758 + timestamp: 1730967204736 +- conda: https://prefix.dev/conda-forge/osx-arm64/libexpat-2.6.4-h286801f_0.conda + sha256: e42ab5ace927ee7c84e3f0f7d813671e1cf3529f5f06ee5899606630498c2745 + md5: 38d2656dd914feb0cab8c629370768bf + depends: + - __osx >=11.0 + constrains: + - expat 2.6.4.* + license: MIT + license_family: MIT + size: 64693 + timestamp: 1730967175868 +- conda: https://prefix.dev/conda-forge/win-64/libexpat-2.6.4-he0c23c2_0.conda + sha256: 0c0447bf20d1013d5603499de93a16b6faa92d7ead870d96305c0f065b6a5a12 + md5: eb383771c680aa792feb529eaf9df82f + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - expat 2.6.4.* + license: MIT + license_family: MIT + size: 139068 + timestamp: 1730967442102 +- conda: https://prefix.dev/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + sha256: ab6e9856c21709b7b517e940ae7028ae0737546122f83c2aa5d692860c3b149e + md5: d645c6d2ac96843a2bfaccd2d62b3ac3 + depends: + - libgcc-ng >=9.4.0 + license: MIT + license_family: MIT + size: 58292 + timestamp: 1636488182923 +- conda: https://prefix.dev/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 + sha256: 7a2d27a936ceee6942ea4d397f9c7d136f12549d86f7617e8b6bad51e01a941f + md5: ccb34fb14960ad8b125962d3d79b31a9 + license: MIT + license_family: MIT + size: 51348 + timestamp: 1636488394370 +- conda: https://prefix.dev/conda-forge/osx-arm64/libffi-3.4.2-h3422bc3_5.tar.bz2 + sha256: 41b3d13efb775e340e4dba549ab5c029611ea6918703096b2eaa9c015c0750ca + md5: 086914b672be056eb70fd4285b6783b6 + license: MIT + license_family: MIT + size: 39020 + timestamp: 1636488587153 +- conda: https://prefix.dev/conda-forge/win-64/libffi-3.4.2-h8ffe710_5.tar.bz2 + sha256: 1951ab740f80660e9bc07d2ed3aefb874d78c107264fd810f24a1a6211d4b1a5 + md5: 2c96d1b6915b408893f9472569dee135 + depends: + - vc >=14.1,<15.0a0 + - vs2015_runtime >=14.16.27012 + license: MIT + license_family: MIT + size: 42063 + timestamp: 1636489106777 +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda + sha256: 3a76969c80e9af8b6e7a55090088bc41da4cffcde9e2c71b17f44d37b7cb87f7 + md5: e39480b9ca41323497b05492a63bc35b + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 54142 + timestamp: 1729027726517 +- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- conda: https://prefix.dev/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda + sha256: d02d1d3304ecaf5c728e515eb7416517a0b118200cd5eacbe829c432d1664070 + md5: aeb98fdeb2e8f25d43ef71fbacbeec80 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: BSD-2-Clause + license_family: BSD + size: 89991 + timestamp: 1723817448345 +- conda: https://prefix.dev/conda-forge/osx-64/libmpdec-4.0.0-hfdf4475_0.conda + sha256: 791be3d30d8e37ec49bcc23eb8f1e1415d911a7c023fa93685f2ea485179e258 + md5: ed625b2e59dff82859c23dd24774156b + depends: + - __osx >=10.13 + license: BSD-2-Clause + license_family: BSD + size: 76561 + timestamp: 1723817691512 +- conda: https://prefix.dev/conda-forge/osx-arm64/libmpdec-4.0.0-h99b78c6_0.conda + sha256: f7917de9117d3a5fe12a39e185c7ce424f8d5010a6f97b4333e8a1dcb2889d16 + md5: 7476305c35dd9acef48da8f754eedb40 + depends: + - __osx >=11.0 + license: BSD-2-Clause + license_family: BSD + size: 69263 + timestamp: 1723817629767 +- conda: https://prefix.dev/conda-forge/win-64/libmpdec-4.0.0-h2466b09_0.conda + sha256: fc529fc82c7caf51202cc5cec5bb1c2e8d90edbac6d0a4602c966366efe3c7bf + md5: 74860100b2029e2523cf480804c76b9b + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 88657 + timestamp: 1723861474602 +- conda: https://prefix.dev/conda-forge/linux-64/libsqlite-3.47.0-hadc24fc_1.conda + sha256: 8a9aadf996a2399f65b679c6e7f29139d5059f699c63e6d7b50e20db10c00508 + md5: b6f02b52a174e612e89548f4663ce56a + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib >=1.3.1,<2.0a0 + license: Unlicense + size: 875349 + timestamp: 1730208050020 +- conda: https://prefix.dev/conda-forge/osx-64/libsqlite-3.47.0-h2f8c449_1.conda + sha256: a0f7381c867898a45018b1e5cf1aca68659d292d58252e8f489a4270b010fed8 + md5: af445c495253a871c3d809e1199bb12b + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + license: Unlicense + size: 915300 + timestamp: 1730208101739 +- conda: https://prefix.dev/conda-forge/osx-arm64/libsqlite-3.47.0-hbaaea75_1.conda + sha256: 5a96caa566c11e5a5ebdcdb86a0759a7fb27d3c5f42e6a0fd0d6023c1e935d9e + md5: 07a14fbe439eef078cc479deca321161 + depends: + - __osx >=11.0 + - libzlib >=1.3.1,<2.0a0 + license: Unlicense + size: 837683 + timestamp: 1730208293578 +- conda: https://prefix.dev/conda-forge/win-64/libsqlite-3.47.0-h2466b09_1.conda + sha256: 3342d6fe787f5830f7e8466d9c65c914bfd8d67220fb5673041b338cbba47afe + md5: 5b1f36012cc3d09c4eb9f24ad0e2c379 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Unlicense + size: 892175 + timestamp: 1730208431651 +- conda: https://prefix.dev/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18 + md5: 40b61aab5c7ba9ff276c41cfffe6b80b + depends: + - libgcc-ng >=12 + license: BSD-3-Clause + license_family: BSD + size: 33601 + timestamp: 1680112270483 +- conda: https://prefix.dev/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 + md5: edb0dca6bc32e4f4789199455a1dbeb8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 60963 + timestamp: 1727963148474 +- conda: https://prefix.dev/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + sha256: 8412f96504fc5993a63edf1e211d042a1fd5b1d51dedec755d2058948fcced09 + md5: 003a54a4e32b02f7355b50a837e699da + depends: + - __osx >=10.13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 57133 + timestamp: 1727963183990 +- conda: https://prefix.dev/conda-forge/osx-arm64/libzlib-1.3.1-h8359307_2.conda + sha256: ce34669eadaba351cd54910743e6a2261b67009624dbc7daeeafdef93616711b + md5: 369964e85dc26bfe78f41399b366c435 + depends: + - __osx >=11.0 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 46438 + timestamp: 1727963202283 +- conda: https://prefix.dev/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + sha256: ba945c6493449bed0e6e29883c4943817f7c79cbff52b83360f7b341277c6402 + md5: 41fbfac52c601159df6c01f875de31b9 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 55476 + timestamp: 1727963768015 +- conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-he02047a_1.conda + sha256: 6a1d5d8634c1a07913f1c525db6455918cbc589d745fac46d9d6e30340c8731a + md5: 70caf8bb6cf39a0b6b7efc885f51c0fe + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: X11 AND BSD-3-Clause + size: 889086 + timestamp: 1724658547447 +- conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-hf036a51_1.conda + sha256: b0b3180039ef19502525a2abd5833c00f9624af830fd391f851934d57bffb9af + md5: e102bbf8a6ceeaf429deab8032fc8977 + depends: + - __osx >=10.13 + license: X11 AND BSD-3-Clause + size: 822066 + timestamp: 1724658603042 +- conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h7bae524_1.conda + sha256: 27d0b9ff78ad46e1f3a6c96c479ab44beda5f96def88e2fe626e0a49429d8afc + md5: cb2b0ea909b97b3d70cd3921d1445e1a + depends: + - __osx >=11.0 + license: X11 AND BSD-3-Clause + size: 802321 + timestamp: 1724658775723 +- conda: https://prefix.dev/conda-forge/linux-64/openssl-3.4.0-hb9d3cd8_0.conda + sha256: 814b9dff1847b132c676ee6cc1a8cb2d427320779b93e1b6d76552275c128705 + md5: 23cc74f77eb99315c0360ec3533147a9 + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=13 + license: Apache-2.0 + license_family: Apache + size: 2947466 + timestamp: 1731377666602 +- conda: https://prefix.dev/conda-forge/osx-64/openssl-3.4.0-hd471939_0.conda + sha256: ba7e068ed469d6625e32ae60e6ad893e655b6695280dadf7e065ed0b6f3b885c + md5: ec99d2ce0b3033a75cbad01bbc7c5b71 + depends: + - __osx >=10.13 + - ca-certificates + license: Apache-2.0 + license_family: Apache + size: 2590683 + timestamp: 1731378034404 +- conda: https://prefix.dev/conda-forge/osx-arm64/openssl-3.4.0-h39f12f2_0.conda + sha256: bd1d58ced46e75efa3b842c61642fd12272c69e9fe4d7261078bc082153a1d53 + md5: df307bbc703324722df0293c9ca2e418 + depends: + - __osx >=11.0 + - ca-certificates + license: Apache-2.0 + license_family: Apache + size: 2935176 + timestamp: 1731377561525 +- conda: https://prefix.dev/conda-forge/win-64/openssl-3.4.0-h2466b09_0.conda + sha256: e03045a0837e01ff5c75e9273a572553e7522290799807f918c917a9826a6484 + md5: d0d805d9b5524a14efb51b3bff965e83 + depends: + - ca-certificates + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Apache-2.0 + license_family: Apache + size: 8491156 + timestamp: 1731379715927 +- conda: https://prefix.dev/conda-forge/linux-64/python-3.13.0-h9ebbce0_101_cp313.conda + build_number: 101 + sha256: 66a7997b24b2dca636df11402abec7bd2199ddf6971eb47a3ee6b1d27d4faee9 + md5: f4fea9d5bb3f2e61a39950a7ab70ee4e + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - ld_impl_linux-64 >=2.36.1 + - libexpat >=2.6.4,<3.0a0 + - libffi >=3.4,<4.0a0 + - libgcc >=13 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.47.0,<4.0a0 + - libuuid >=2.38.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.4.0,<4.0a0 + - python_abi 3.13.* *_cp313 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 33054218 + timestamp: 1732736838043 +- conda: https://prefix.dev/conda-forge/osx-64/python-3.13.0-h3a8ca6c_101_cp313.conda + build_number: 101 + sha256: c8b23bbdcd0e4f24fed2028cba20bd81325a4220439c1b8e6b06694f16642a2c + md5: 0acea4c3eee2454fd642d1a4eafa2943 + depends: + - __osx >=10.13 + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.6.4,<3.0a0 + - libffi >=3.4,<4.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.47.0,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.4.0,<4.0a0 + - python_abi 3.13.* *_cp313 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 13941305 + timestamp: 1732736712289 +- conda: https://prefix.dev/conda-forge/osx-arm64/python-3.13.0-hbbac1ca_101_cp313.conda + build_number: 101 + sha256: 742544a4cf9a10cf2c16d35d96fb696c27d58b9df0cc29fbef5629283aeca941 + md5: e972e146a1e0cfb1f26da42cb6f6648c + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.6.4,<3.0a0 + - libffi >=3.4,<4.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.47.0,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.4.0,<4.0a0 + - python_abi 3.13.* *_cp313 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 12806496 + timestamp: 1732735488999 +- conda: https://prefix.dev/conda-forge/win-64/python-3.13.0-hf5aa216_101_cp313.conda + build_number: 101 + sha256: b8eba57bd86c7890b27e67b477b52b5bd547946c354f29b9dbbc70ad83f2863b + md5: 158d6077a635cf0c0c23bec3955a4833 + depends: + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.6.4,<3.0a0 + - libffi >=3.4,<4.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.47.0,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.4.0,<4.0a0 + - python_abi 3.13.* *_cp313 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 16697406 + timestamp: 1732734725404 +- conda: https://prefix.dev/conda-forge/linux-64/python_abi-3.13-5_cp313.conda + build_number: 5 + sha256: 438225b241c5f9bddae6f0178a97f5870a89ecf927dfca54753e689907331442 + md5: 381bbd2a92c863f640a55b6ff3c35161 + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6217 + timestamp: 1723823393322 +- conda: https://prefix.dev/conda-forge/osx-64/python_abi-3.13-5_cp313.conda + build_number: 5 + sha256: 075ad768648e88b78d2a94099563b43d3082e7c35979f457164f26d1079b7b5c + md5: 927a2186f1f997ac018d67c4eece90a6 + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6291 + timestamp: 1723823083064 +- conda: https://prefix.dev/conda-forge/osx-arm64/python_abi-3.13-5_cp313.conda + build_number: 5 + sha256: 4437198eae80310f40b23ae2f8a9e0a7e5c2b9ae411a8621eb03d87273666199 + md5: b8e82d0a5c1664638f87f63cc5d241fb + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6322 + timestamp: 1723823058879 +- conda: https://prefix.dev/conda-forge/win-64/python_abi-3.13-5_cp313.conda + build_number: 5 + sha256: 0c12cc1b84962444002c699ed21e815fb9f686f950d734332a1b74d07db97756 + md5: 44b4fe6f22b57103afb2299935c8b68e + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6716 + timestamp: 1723823166911 +- conda: https://prefix.dev/conda-forge/linux-64/readline-8.2-h8228510_1.conda + sha256: 5435cf39d039387fbdc977b0a762357ea909a7694d9528ab40f005e9208744d7 + md5: 47d31b792659ce70f470b5c82fdfb7a4 + depends: + - libgcc-ng >=12 + - ncurses >=6.3,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 281456 + timestamp: 1679532220005 +- conda: https://prefix.dev/conda-forge/osx-64/readline-8.2-h9e318b2_1.conda + sha256: 41e7d30a097d9b060037f0c6a2b1d4c4ae7e942c06c943d23f9d481548478568 + md5: f17f77f2acf4d344734bda76829ce14e + depends: + - ncurses >=6.3,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 255870 + timestamp: 1679532707590 +- conda: https://prefix.dev/conda-forge/osx-arm64/readline-8.2-h92ec313_1.conda + sha256: a1dfa679ac3f6007362386576a704ad2d0d7a02e98f5d0b115f207a2da63e884 + md5: 8cbb776a2f641b943d413b3e19df71f4 + depends: + - ncurses >=6.3,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 250351 + timestamp: 1679532511311 +- conda: https://prefix.dev/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + sha256: e0569c9caa68bf476bead1bed3d79650bb080b532c64a4af7d8ca286c08dea4e + md5: d453b98d9c83e71da0741bb0ff4d76bc + depends: + - libgcc-ng >=12 + - libzlib >=1.2.13,<2.0.0a0 + license: TCL + license_family: BSD + size: 3318875 + timestamp: 1699202167581 +- conda: https://prefix.dev/conda-forge/osx-64/tk-8.6.13-h1abcd95_1.conda + sha256: 30412b2e9de4ff82d8c2a7e5d06a15f4f4fef1809a72138b6ccb53a33b26faf5 + md5: bf830ba5afc507c6232d4ef0fb1a882d + depends: + - libzlib >=1.2.13,<2.0.0a0 + license: TCL + license_family: BSD + size: 3270220 + timestamp: 1699202389792 +- conda: https://prefix.dev/conda-forge/osx-arm64/tk-8.6.13-h5083fa2_1.conda + sha256: 72457ad031b4c048e5891f3f6cb27a53cb479db68a52d965f796910e71a403a8 + md5: b50a57ba89c32b62428b71a875291c9b + depends: + - libzlib >=1.2.13,<2.0.0a0 + license: TCL + license_family: BSD + size: 3145523 + timestamp: 1699202432999 +- conda: https://prefix.dev/conda-forge/win-64/tk-8.6.13-h5226925_1.conda + sha256: 2c4e914f521ccb2718946645108c9bd3fc3216ba69aea20c2c3cedbd8db32bb1 + md5: fc048363eb8f03cd1737600a5d08aafe + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: TCL + license_family: BSD + size: 3503410 + timestamp: 1699202577803 +- conda: https://prefix.dev/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + sha256: 4fde5c3008bf5d2db82f2b50204464314cc3c91c1d953652f7bd01d9e52aefdf + md5: 8ac3367aafb1cc0a068483c580af8015 + license: LicenseRef-Public-Domain + size: 122354 + timestamp: 1728047496079 +- conda: https://prefix.dev/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + sha256: db8dead3dd30fb1a032737554ce91e2819b43496a0db09927edf01c32b577450 + md5: 6797b005cd0f439c4c5c9ac565783700 + constrains: + - vs2015_runtime >=14.29.30037 + license: LicenseRef-MicrosoftWindowsSDK10 + size: 559710 + timestamp: 1728377334097 +- conda: https://prefix.dev/conda-forge/win-64/vc-14.3-ha32ba9b_23.conda + sha256: 986ddaf8feec2904eac9535a7ddb7acda1a1dfb9482088fdb8129f1595181663 + md5: 7c10ec3158d1eb4ddff7007c9101adb0 + depends: + - vc14_runtime >=14.38.33135 + track_features: + - vc14 + license: BSD-3-Clause + license_family: BSD + size: 17479 + timestamp: 1731710827215 +- conda: https://prefix.dev/conda-forge/win-64/vc14_runtime-14.42.34433-he29a5d6_23.conda + sha256: c483b090c4251a260aba6ff3e83a307bcfb5fb24ad7ced872ab5d02971bd3a49 + md5: 32b37d0cfa80da34548501cdc913a832 + depends: + - ucrt >=10.0.20348.0 + constrains: + - vs2015_runtime 14.42.34433.* *_23 + license: LicenseRef-MicrosoftVisualCpp2015-2022Runtime + license_family: Proprietary + size: 754247 + timestamp: 1731710681163 +- conda: https://prefix.dev/conda-forge/win-64/vs2015_runtime-14.42.34433-hdffcdeb_23.conda + sha256: 568ce8151eaae256f1cef752fc78651ad7a86ff05153cc7a4740b52ae6536118 + md5: 5c176975ca2b8366abad3c97b3cd1e83 + depends: + - vc14_runtime >=14.42.34433 + license: BSD-3-Clause + license_family: BSD + size: 17572 + timestamp: 1731710685291 +- conda: https://prefix.dev/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + sha256: 03a6d28ded42af8a347345f82f3eebdd6807a08526d47899a42d62d319609162 + md5: 2161070d867d1b1204ea749c8eec4ef0 + depends: + - libgcc-ng >=12 + license: LGPL-2.1 and GPL-2.0 + size: 418368 + timestamp: 1660346797927 +- conda: https://prefix.dev/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 + sha256: eb09823f34cc2dd663c0ec4ab13f246f45dcd52e5b8c47b9864361de5204a1c8 + md5: a72f9d4ea13d55d745ff1ed594747f10 + license: LGPL-2.1 and GPL-2.0 + size: 238119 + timestamp: 1660346964847 +- conda: https://prefix.dev/conda-forge/osx-arm64/xz-5.2.6-h57fd34a_0.tar.bz2 + sha256: 59d78af0c3e071021cfe82dc40134c19dab8cdf804324b62940f5c8cd71803ec + md5: 39c6b54e94014701dd157f4f576ed211 + license: LGPL-2.1 and GPL-2.0 + size: 235693 + timestamp: 1660346961024 +- conda: https://prefix.dev/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2 + sha256: 54d9778f75a02723784dc63aff4126ff6e6749ba21d11a6d03c1f4775f269fe0 + md5: 515d77642eaa3639413c6b1bc3f94219 + depends: + - vc >=14.1,<15 + - vs2015_runtime >=14.16.27033 + license: LGPL-2.1 and GPL-2.0 + size: 217804 + timestamp: 1660346976440 diff --git a/tests/data/pixi_build/editable-pyproject/pyproject.toml b/tests/data/pixi_build/editable-pyproject/pyproject.toml new file mode 100644 index 000000000..2afbf4e02 --- /dev/null +++ b/tests/data/pixi_build/editable-pyproject/pyproject.toml @@ -0,0 +1,54 @@ +[project] +dependencies = [] +name = "editable-pyproject" +requires-python = ">= 3.11" +version = "0.1.0" + +[build-system] +build-backend = "hatchling.build" +requires = ["hatchling"] + +[tool.pixi.project] +channels = ["https://prefix.dev/conda-forge"] +platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] +preview = ["pixi-build"] + +[tool.pixi.host-dependencies] +# To be able to install this pyproject we need to install the dependencies of +# the python build-system defined above. Note that different from the +# pyproject build-system this refers to a conda package instead of a pypi +# package. +hatchling = "==1.26.3" + +# The build-system section defines the build system that will be used to turn +# the source code of this package into a conda package. Similarly to the above +# [build-system] section this section instructs pixi which build backend to +# use. The build-backend is an executable that is installed and invoked by +# pixi with the sole purpose to build the package. +[tool.pixi.build-system] +# The name of the build backend to use. This name refers both to the name of +# the package that provides the build backend and the name of the executable +# inside the package that is invoked. +# +# The `build-backend` key also functions as a dependency declaration. At least +# a version specifier must be added. +build-backend = { name = "pixi-build-python", version = "*" } +# These are the conda channels that are used to resolve the dependencies of the +# build backend package. +channels = [ + "https://prefix.dev/pixi-build-backends", + "https://prefix.dev/conda-forge", +] + +[tool.pixi.dependencies] +editable-pyproject = { path = "." } + +[tool.pixi.tasks] +check-editable = "python -c 'import editable_pyproject; editable_pyproject.check_editable()'" + +# This section marks the project as a pixi package. +# +# Normally a number of fields would be set here, like the name, version, etc. +# However, since all these fields are already defined in the [project] section +# at the top of this file they are not required. +[tool.pixi.package] diff --git a/tests/data/pixi_build/editable-pyproject/src/editable_pyproject/__init__.py b/tests/data/pixi_build/editable-pyproject/src/editable_pyproject/__init__.py new file mode 100644 index 000000000..9e8f428a7 --- /dev/null +++ b/tests/data/pixi_build/editable-pyproject/src/editable_pyproject/__init__.py @@ -0,0 +1,23 @@ +__version__ = "1.0.0" + +import sys +from pathlib import Path +import site + + +def is_editable() -> bool: + package_name = "editable_pyproject" + for site_package in site.getsitepackages(): + egg_link_path = Path(site_package).joinpath(f"_{package_name}.pth") + if egg_link_path.is_file(): + return True + return False + + +def check_editable() -> None: + if is_editable(): + print("The package is installed as editable.") + sys.exit(0) + else: + print("The package is not installed as editable.") + sys.exit(1) diff --git a/tests/integration_python/pixi_build/test_build.py b/tests/integration_python/pixi_build/test_build.py index 01d6cc030..a797666b1 100644 --- a/tests/integration_python/pixi_build/test_build.py +++ b/tests/integration_python/pixi_build/test_build.py @@ -3,7 +3,7 @@ import json -from ..common import verify_cli_command +from ..common import verify_cli_command, ExitCode def test_build_conda_package(pixi: Path, examples_dir: Path, tmp_pixi_workspace: Path) -> None: @@ -88,12 +88,13 @@ def test_smokey(pixi: Path, build_data: Path, tmp_pixi_workspace: Path) -> None: def test_source_change_trigger_rebuild( pixi: Path, build_data: Path, tmp_pixi_workspace: Path ) -> None: - test_data = build_data.joinpath("simple-pyproject") + project = "simple-pyproject" + test_data = build_data.joinpath(project) # TODO: Setting the cache dir shouldn't be necessary! env = {"PIXI_CACHE_DIR": str(tmp_pixi_workspace.joinpath("pixi_cache"))} - target_dir = tmp_pixi_workspace.joinpath("simple-pyproject") + target_dir = tmp_pixi_workspace.joinpath(project) shutil.copytree(test_data, target_dir) manifest_path = target_dir.joinpath("pyproject.toml") @@ -125,3 +126,61 @@ def test_source_change_trigger_rebuild( stdout_contains="The version of simple-pyproject is 2.0.0", env=env, ) + + +def test_editable_pyproject(pixi: Path, build_data: Path, tmp_pixi_workspace: Path) -> None: + project = "editable-pyproject" + test_data = build_data.joinpath(project) + + # TODO: Setting the cache dir shouldn't be necessary! + env = { + "PIXI_CACHE_DIR": str(tmp_pixi_workspace.joinpath("pixi_cache")), + "PIXI_BUILD_BACKEND_OVERRIDE": "/var/home/julian/Projekte/github.com/prefix-dev/pixi-build-backends/target/release/pixi-build-python", + } + + target_dir = tmp_pixi_workspace.joinpath(project) + shutil.copytree(test_data, target_dir) + manifest_path = target_dir.joinpath("pyproject.toml") + + verify_cli_command( + [ + pixi, + "install", + "--manifest-path", + manifest_path, + ], + env=env, + ) + + # Verify that package is installed as editable + verify_cli_command( + [ + pixi, + "run", + "--manifest-path", + manifest_path, + "check-editable", + ], + env=env, + stdout_contains="The package is installed as editable.", + ) + + # Set editable to false + manifest_path = target_dir.joinpath("pyproject.toml") + manifest_path.write_text( + manifest_path.read_text().replace("editable = true", "editable = false") + ) + + # Verify that package is *not* installed as editable + verify_cli_command( + [ + pixi, + "run", + "--manifest-path", + manifest_path, + "check-editable", + ], + ExitCode.FAILURE, + env=env, + stdout_contains="The package is not installed as editable.", + )