-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add C compiler dep when
.xs
files are found. (#4599)
* Added `.xs` to the list of extensions that trigger the addition of a C compiler app for Perl recipes created by conda skeleton. * test: Add CPAN skeleton test for XS --------- Co-authored-by: Felix Kuehnl <[email protected]> Co-authored-by: Marcel Bargull <[email protected]>
- Loading branch information
1 parent
ab1d124
commit f7e8bc3
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Enhancements | ||
|
||
* <news item> | ||
|
||
### Bug fixes | ||
|
||
* conda skeleton cpan now correctly adds a C compiler as dependency if the distribution contains an `.xs` file | ||
|
||
### Deprecations | ||
|
||
* <news item> | ||
|
||
### Docs | ||
|
||
* <news item> | ||
|
||
### Other | ||
|
||
* <news item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (C) 2014 Anaconda, Inc | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
''' | ||
Integrative tests of the CPAN skeleton that start from | ||
conda_build.api.skeletonize and check the output files | ||
''' | ||
|
||
|
||
import pytest | ||
|
||
from conda_build import api | ||
from conda_build.jinja_context import compiler | ||
|
||
|
||
@pytest.mark.slow | ||
@pytest.mark.flaky(rerun=5, reruns_delay=2) | ||
def test_xs_needs_c_compiler(testing_config): | ||
"""Perl packages with XS files need a C compiler""" | ||
# This uses Sub::Identify=0.14 since it includes no .c files but a .xs file. | ||
api.skeletonize("Sub::Identify", version="0.14", repo="cpan", config=testing_config) | ||
m = api.render("perl-sub-identify/0.14", finalize=False, bypass_env_check=True)[0][0] | ||
build_requirements = m.get_value("requirements/build") | ||
assert compiler("c", testing_config) in build_requirements |