Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark skeleton for deprecation. #4886

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bc2c474
Mark skeleton for deprecation.
jezdez May 16, 2023
06e76fe
Remove useless import.
jezdez May 16, 2023
54a508b
Update conda_build/cli/main_skeleton.py
jezdez May 16, 2023
766ef4d
Update news/4640-use-grayskull
jezdez May 16, 2023
6db94df
Fix imports.
jezdez May 16, 2023
8066acb
Merge branch 'deprecate-skeleton' of github.com:conda/conda-build int…
jezdez May 16, 2023
a0a4b13
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2023
f457bc2
Merge branch 'main' into deprecate-skeleton
kenodegard May 16, 2023
e9a924d
Update news/4640-use-grayskull
kenodegard May 17, 2023
e1be96a
Merge branch 'main' into deprecate-skeleton
jezdez May 17, 2023
e4a532f
Merge branch 'deprecate-skeleton' of github.com:conda/conda-build int…
jezdez May 17, 2023
85bf937
Use inspect.signature instead.
jezdez May 17, 2023
e1a6260
Fix imports.
jezdez May 17, 2023
1a8e04b
Mark skeleton for deprecation.
jezdez May 16, 2023
91f0219
Remove useless import.
jezdez May 16, 2023
2e6046d
Update conda_build/cli/main_skeleton.py
jezdez May 16, 2023
cf4b58c
Update news/4640-use-grayskull
jezdez May 16, 2023
c3d67c9
Fix imports.
jezdez May 16, 2023
a305a46
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2023
366bc07
Update news/4640-use-grayskull
kenodegard May 17, 2023
319e51b
Use inspect.signature instead.
jezdez May 17, 2023
555e855
Fix imports.
jezdez May 17, 2023
ed5f7f0
Merge branch 'deprecate-skeleton' of github.com:conda/conda-build int…
jezdez May 23, 2023
5577b73
Use inspect for skeleton loading.
jezdez May 23, 2023
9d5ced8
Add URL.
jezdez May 23, 2023
cc7bead
Merge branch 'main' of github.com:conda/conda-build into deprecate-sk…
jezdez Jun 5, 2023
3ec446e
Update lower version of deprecation.
jezdez Jun 5, 2023
1795ee4
Undo accidental change.
jezdez Jun 5, 2023
d2b2a00
Sigh.
jezdez Jun 5, 2023
b2c4098
Update conda_build/cli/main_skeleton.py
jezdez Jun 6, 2023
cedec87
Update conda_build/skeletons/pypi.py
jezdez Jun 6, 2023
2805971
Update conda_build/skeletons/cpan.py
jezdez Jun 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conda_build/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def test(
return test_result


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def list_skeletons():
"""List available skeletons for generating conda recipes from external sources.

Expand All @@ -315,6 +316,7 @@ def list_skeletons():
return files


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def skeletonize(
packages, repo, output_dir=".", version=None, recursive=False, config=None, **kwargs
):
Expand Down
16 changes: 13 additions & 3 deletions conda_build/cli/main_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
import pkgutil
import sys

import conda_build.api as api
from conda_build.conda_interface import ArgumentParser
from conda_build.config import Config
from .. import api
from ..conda_interface import ArgumentParser
from ..config import Config
from ..deprecations import deprecated


thisdir = os.path.dirname(os.path.abspath(__file__))
logging.basicConfig(level=logging.INFO)
Expand All @@ -19,6 +21,7 @@ def parse_args(args):
description="""
Generates a boilerplate/skeleton recipe, which you can then edit to create a
full recipe. Some simple skeleton recipes may not even need edits.
Pending deprecation, please use the standalone project 'grayskull'."
""",
epilog="""
Run --help on the subcommands like 'conda skeleton pypi --help' to see the
Expand Down Expand Up @@ -46,6 +49,13 @@ def execute(args):
parser, args = parse_args(args)
config = Config(**args.__dict__)

deprecated.topic(
"3.25.0",
"4.0.0",
topic="`conda-build skeleton` and `conda skeleton`",
addendum="Use the `grayskull` project instead.",
)

if not args.repo:
parser.print_help()
sys.exit()
Expand Down
15 changes: 8 additions & 7 deletions conda_build/skeletons/cpan.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import requests

from conda_build import environ
from conda_build.conda_interface import (
from . import environ
from ..conda_interface import (
CondaError,
CondaHTTPError,
MatchSpec,
Expand All @@ -31,10 +31,11 @@
download,
get_index,
)
from conda_build.config import get_or_merge_config
from conda_build.utils import check_call_env, on_win
from conda_build.variants import get_default_variant
from conda_build.version import _parse as parse_version
from ..config import get_or_merge_config
from ..deprecations import deprecated
from ..utils import check_call_env, on_win
from ..variants import get_default_variant
from ..version import _parse as parse_version

CPAN_META = """\
{{% set name = "{packagename}" %}}
Expand Down Expand Up @@ -390,7 +391,7 @@ def get_core_modules_for_this_perl_version(version, cache_dir):
)


# meta_cpan_url="http://api.metacpan.org",
@deprecated("3.25.0", "4.0.0", addendum="Use grayskull instead.")
def skeletonize(
packages,
output_dir=".",
Expand Down
14 changes: 8 additions & 6 deletions conda_build/skeletons/cran.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@

from conda.common.io import dashlist

from conda_build import metadata, source
from conda_build.conda_interface import TemporaryDirectory, cc_conda_build
from conda_build.config import get_or_merge_config
from conda_build.license_family import allowed_license_families, guess_license_family
from conda_build.utils import ensure_list, rm_rf
from conda_build.variants import DEFAULT_VARIANTS, get_package_variants
from . import metadata, source
from ..conda_interface import TemporaryDirectory, cc_conda_build
from ..config import get_or_merge_config
from ..deprecations import deprecated
from ..license_family import allowed_license_families, guess_license_family
from ..utils import ensure_list, rm_rf
from ..variants import DEFAULT_VARIANTS, get_package_variants

SOURCE_META = """\
{archive_keys}
Expand Down Expand Up @@ -853,6 +854,7 @@ def remove_comments(template):
return "\n".join(lines_no_comments)


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def skeletonize(
in_packages,
output_dir=".",
Expand Down
4 changes: 4 additions & 0 deletions conda_build/skeletons/luarocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from glob import glob
from sys import platform as _platform

from ..deprecations import deprecated


INDENT = "\n - "

rockspec_parser = """
Expand Down Expand Up @@ -224,6 +227,7 @@ def ensure_base_deps(deps):
return deps


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def skeletonize(packages, output_dir=".", version=None, recursive=False):
# Check that we have Lua installed (any version)

Expand Down
20 changes: 11 additions & 9 deletions conda_build/skeletons/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import yaml
from requests.packages.urllib3.util.url import parse_url

from conda_build.conda_interface import (
from ..conda_interface import (
StringIO,
configparser,
default_python,
Expand All @@ -34,20 +34,21 @@
normalized_version,
spec_from_line,
)
from conda_build.config import Config
from conda_build.environ import create_env
from conda_build.license_family import allowed_license_families, guess_license_family
from conda_build.metadata import MetaData
from conda_build.render import FIELDS as EXPECTED_SECTION_ORDER
from conda_build.source import apply_patch
from conda_build.utils import (
from ..config import Config
from ..deprecations import deprecated
from ..environ import create_env
from ..license_family import allowed_license_families, guess_license_family
from ..metadata import MetaData
from ..render import FIELDS as EXPECTED_SECTION_ORDER
from ..source import apply_patch
from ..utils import (
check_call_env,
decompressible_exts,
ensure_list,
rm_rf,
tar_xf,
)
from conda_build.version import _parse as parse_version
from ..version import _parse as parse_version

pypi_example = """
Examples:
Expand Down Expand Up @@ -253,6 +254,7 @@ def _formating_value(attribute_name, attribute_value):
return " " + str(attribute_value) + "\n"


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def skeletonize(
packages,
output_dir=".",
Expand Down
7 changes: 4 additions & 3 deletions conda_build/skeletons/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import argparse
from copy import copy

from conda_build.license_family import guess_license_family
from conda_build.source import download_to_cache

try:
import cPickle as pickle
except:
Expand All @@ -19,6 +16,9 @@
from textwrap import wrap
from xml.etree import ElementTree as ET

from ..deprecations import deprecated
from ..license_family import guess_license_family
from ..source import download_to_cache
from .cran import yaml_quote_string

try:
Expand Down Expand Up @@ -719,6 +719,7 @@ def write_conda_recipe(
)


@deprecated("3.25.0", "4.0.0", addendum="Use `grayskull` instead.")
def skeletonize(
packages,
output_dir=".",
Expand Down
23 changes: 23 additions & 0 deletions news/4640-use-grayskull
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* `conda-build skeleton` is pending deprecation. `conda-build` still provides the
`conda-build skeleton` a.k.a. `conda skeleton` CLI for now, but will remove
it eventually.
* Prefer the [standalone grayskull package](https://conda.github.io/grayskull/),
instead of `conda-build skeleton` or `conda skeleton`.

### Docs

* <news item>

### Other

* <news item>