Skip to content

py-poetry-core: jail git to stage directory#33181

Merged
alalazo merged 1 commit intospack:developfrom
adamjstewart:packages/py-poetry-core
Oct 12, 2022
Merged

py-poetry-core: jail git to stage directory#33181
alalazo merged 1 commit intospack:developfrom
adamjstewart:packages/py-poetry-core

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

See python-poetry/poetry#5547 for discussion of the bug that this PR works around.

Fixes #32375 @skosukhin
Fixes #29308 @climbfuji
Fixes #32936 (comment) @luke-dt

Can everyone test this to ensure that it works?

Should this be done for all packages in Spack? I can imagine other packages whose build behavior changes depending on how far git recurses up the build tree. But I'm not sure where in build_environment.py to put this.

Are there any possible issues with this approach? What if someone is behind a firewall and requires proxy stuff that is in their global git configuration file?

@luke-dt
Copy link
Copy Markdown
Contributor

luke-dt commented Oct 11, 2022

It looks like it builds normally for me

/home/lukedt/scratch/spack/opt/spack/linux-fedora36-zen3/gcc-12.2.1/py-poetry-core-1.2.0-6yit5gowgyg6vs3p3jyu4rvwcqttygqy/lib/python3.9/site-packages
├── poetry
│   └── core
│       ├── exceptions
│       │   ├── base.py
│       │   ├── __init__.py
│       │   └── __pycache__
│       │       ├── base.cpython-39.pyc
│       │       └── __init__.cpython-39.pyc
│       ├── factory.py
│       ├── __init__.py
│       ├── json
│       │   ├── __init__.py
│       │   ├── __pycache__
│       │   │   └── __init__.cpython-39.pyc
│       │   └── schemas
│       │       └── poetry-schema.json
│       ├── masonry
│       │   ├── api.py
│       │   ├── builder.py
│       │   ├── builders
│       │   │   ├── builder.py
│       │   │   ├── __init__.py
│       │   │   ├── __pycache__
│       │   │   │   ├── builder.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── sdist.cpython-39.pyc
│       │   │   │   └── wheel.cpython-39.pyc
│       │   │   ├── sdist.py
│       │   │   └── wheel.py
│       │   ├── __init__.py
│       │   ├── metadata.py
│       │   ├── __pycache__
│       │   │   ├── api.cpython-39.pyc
│       │   │   ├── builder.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   └── metadata.cpython-39.pyc
│       │   └── utils
│       │       ├── helpers.py
│       │       ├── include.py
│       │       ├── __init__.py
│       │       ├── module.py
│       │       ├── package_include.py
│       │       └── __pycache__
│       │           ├── helpers.cpython-39.pyc
│       │           ├── include.cpython-39.pyc
│       │           ├── __init__.cpython-39.pyc
│       │           ├── module.cpython-39.pyc
│       │           └── package_include.cpython-39.pyc
│       ├── packages
│       │   ├── constraints
│       │   │   ├── any_constraint.py
│       │   │   ├── base_constraint.py
│       │   │   ├── constraint.py
│       │   │   ├── empty_constraint.py
│       │   │   ├── __init__.py
│       │   │   ├── multi_constraint.py
│       │   │   ├── __pycache__
│       │   │   │   ├── any_constraint.cpython-39.pyc
│       │   │   │   ├── base_constraint.cpython-39.pyc
│       │   │   │   ├── constraint.cpython-39.pyc
│       │   │   │   ├── empty_constraint.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── multi_constraint.cpython-39.pyc
│       │   │   │   └── union_constraint.cpython-39.pyc
│       │   │   └── union_constraint.py
│       │   ├── dependency_group.py
│       │   ├── dependency.py
│       │   ├── directory_dependency.py
│       │   ├── file_dependency.py
│       │   ├── __init__.py
│       │   ├── package.py
│       │   ├── project_package.py
│       │   ├── __pycache__
│       │   │   ├── dependency.cpython-39.pyc
│       │   │   ├── dependency_group.cpython-39.pyc
│       │   │   ├── directory_dependency.cpython-39.pyc
│       │   │   ├── file_dependency.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   ├── package.cpython-39.pyc
│       │   │   ├── project_package.cpython-39.pyc
│       │   │   ├── specification.cpython-39.pyc
│       │   │   ├── url_dependency.cpython-39.pyc
│       │   │   └── vcs_dependency.cpython-39.pyc
│       │   ├── specification.py
│       │   ├── url_dependency.py
│       │   ├── utils
│       │   │   ├── __init__.py
│       │   │   ├── link.py
│       │   │   ├── __pycache__
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── link.cpython-39.pyc
│       │   │   │   └── utils.cpython-39.pyc
│       │   │   └── utils.py
│       │   └── vcs_dependency.py
│       ├── poetry.py
│       ├── __pycache__
│       │   ├── factory.cpython-39.pyc
│       │   ├── __init__.cpython-39.pyc
│       │   └── poetry.cpython-39.pyc
│       ├── pyproject
│       │   ├── exceptions.py
│       │   ├── __init__.py
│       │   ├── __pycache__
│       │   │   ├── exceptions.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   ├── tables.cpython-39.pyc
│       │   │   └── toml.cpython-39.pyc
│       │   ├── tables.py
│       │   └── toml.py
│       ├── py.typed
│       ├── semver
│       │   ├── empty_constraint.py
│       │   ├── exceptions.py
│       │   ├── helpers.py
│       │   ├── __init__.py
│       │   ├── patterns.py
│       │   ├── __pycache__
│       │   │   ├── empty_constraint.cpython-39.pyc
│       │   │   ├── exceptions.cpython-39.pyc
│       │   │   ├── helpers.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   ├── patterns.cpython-39.pyc
│       │   │   ├── util.cpython-39.pyc
│       │   │   ├── version_constraint.cpython-39.pyc
│       │   │   ├── version.cpython-39.pyc
│       │   │   ├── version_range_constraint.cpython-39.pyc
│       │   │   ├── version_range.cpython-39.pyc
│       │   │   └── version_union.cpython-39.pyc
│       │   ├── util.py
│       │   ├── version_constraint.py
│       │   ├── version.py
│       │   ├── version_range_constraint.py
│       │   ├── version_range.py
│       │   └── version_union.py
│       ├── spdx
│       │   ├── data
│       │   │   └── licenses.json
│       │   ├── helpers.py
│       │   ├── __init__.py
│       │   ├── license.py
│       │   ├── __pycache__
│       │   │   ├── helpers.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   ├── license.cpython-39.pyc
│       │   │   └── updater.cpython-39.pyc
│       │   └── updater.py
│       ├── toml
│       │   ├── exceptions.py
│       │   ├── file.py
│       │   ├── __init__.py
│       │   └── __pycache__
│       │       ├── exceptions.cpython-39.pyc
│       │       ├── file.cpython-39.pyc
│       │       └── __init__.cpython-39.pyc
│       ├── utils
│       │   ├── _compat.py
│       │   ├── helpers.py
│       │   ├── __init__.py
│       │   ├── patterns.py
│       │   ├── __pycache__
│       │   │   ├── _compat.cpython-39.pyc
│       │   │   ├── helpers.cpython-39.pyc
│       │   │   ├── __init__.cpython-39.pyc
│       │   │   ├── patterns.cpython-39.pyc
│       │   │   └── toml_file.cpython-39.pyc
│       │   └── toml_file.py
│       ├── vcs
│       │   ├── git.py
│       │   ├── __init__.py
│       │   └── __pycache__
│       │       ├── git.cpython-39.pyc
│       │       └── __init__.cpython-39.pyc
│       ├── _vendor
│       │   ├── attr
│       │   │   ├── _cmp.py
│       │   │   ├── _compat.py
│       │   │   ├── _config.py
│       │   │   ├── converters.py
│       │   │   ├── exceptions.py
│       │   │   ├── filters.py
│       │   │   ├── _funcs.py
│       │   │   ├── __init__.py
│       │   │   ├── _make.py
│       │   │   ├── _next_gen.py
│       │   │   ├── __pycache__
│       │   │   │   ├── _cmp.cpython-39.pyc
│       │   │   │   ├── _compat.cpython-39.pyc
│       │   │   │   ├── _config.cpython-39.pyc
│       │   │   │   ├── converters.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── filters.cpython-39.pyc
│       │   │   │   ├── _funcs.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── _make.cpython-39.pyc
│       │   │   │   ├── _next_gen.cpython-39.pyc
│       │   │   │   ├── setters.cpython-39.pyc
│       │   │   │   ├── validators.cpython-39.pyc
│       │   │   │   └── _version_info.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── setters.py
│       │   │   ├── validators.py
│       │   │   └── _version_info.py
│       │   ├── attrs
│       │   │   ├── converters.py
│       │   │   ├── exceptions.py
│       │   │   ├── filters.py
│       │   │   ├── __init__.py
│       │   │   ├── LICENSE
│       │   │   ├── __pycache__
│       │   │   │   ├── converters.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── filters.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── setters.cpython-39.pyc
│       │   │   │   └── validators.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── setters.py
│       │   │   └── validators.py
│       │   ├── jsonschema
│       │   │   ├── benchmarks
│       │   │   │   ├── __init__.py
│       │   │   │   ├── issue232.py
│       │   │   │   ├── json_schema_test_suite.py
│       │   │   │   └── __pycache__
│       │   │   │       ├── __init__.cpython-39.pyc
│       │   │   │       ├── issue232.cpython-39.pyc
│       │   │   │       └── json_schema_test_suite.cpython-39.pyc
│       │   │   ├── cli.py
│       │   │   ├── COPYING
│       │   │   ├── exceptions.py
│       │   │   ├── _format.py
│       │   │   ├── __init__.py
│       │   │   ├── _legacy_validators.py
│       │   │   ├── __main__.py
│       │   │   ├── protocols.py
│       │   │   ├── __pycache__
│       │   │   │   ├── cli.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── _format.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── _legacy_validators.cpython-39.pyc
│       │   │   │   ├── __main__.cpython-39.pyc
│       │   │   │   ├── protocols.cpython-39.pyc
│       │   │   │   ├── _types.cpython-39.pyc
│       │   │   │   ├── _utils.cpython-39.pyc
│       │   │   │   ├── _validators.cpython-39.pyc
│       │   │   │   └── validators.cpython-39.pyc
│       │   │   ├── schemas
│       │   │   │   ├── draft2019-09.json
│       │   │   │   ├── draft2020-12.json
│       │   │   │   ├── draft3.json
│       │   │   │   ├── draft4.json
│       │   │   │   ├── draft6.json
│       │   │   │   ├── draft7.json
│       │   │   │   └── vocabularies.json
│       │   │   ├── _types.py
│       │   │   ├── _utils.py
│       │   │   ├── _validators.py
│       │   │   └── validators.py
│       │   ├── lark
│       │   │   ├── ast_utils.py
│       │   │   ├── common.py
│       │   │   ├── exceptions.py
│       │   │   ├── grammar.py
│       │   │   ├── grammars
│       │   │   │   ├── common.lark
│       │   │   │   ├── lark.lark
│       │   │   │   ├── python.lark
│       │   │   │   └── unicode.lark
│       │   │   ├── indenter.py
│       │   │   ├── __init__.py
│       │   │   ├── lark.py
│       │   │   ├── lexer.py
│       │   │   ├── LICENSE
│       │   │   ├── load_grammar.py
│       │   │   ├── parser_frontends.py
│       │   │   ├── parsers
│       │   │   │   ├── cyk.py
│       │   │   │   ├── earley_common.py
│       │   │   │   ├── earley_forest.py
│       │   │   │   ├── earley.py
│       │   │   │   ├── grammar_analysis.py
│       │   │   │   ├── __init__.py
│       │   │   │   ├── lalr_analysis.py
│       │   │   │   ├── lalr_interactive_parser.py
│       │   │   │   ├── lalr_parser.py
│       │   │   │   ├── __pycache__
│       │   │   │   │   ├── cyk.cpython-39.pyc
│       │   │   │   │   ├── earley_common.cpython-39.pyc
│       │   │   │   │   ├── earley.cpython-39.pyc
│       │   │   │   │   ├── earley_forest.cpython-39.pyc
│       │   │   │   │   ├── grammar_analysis.cpython-39.pyc
│       │   │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   │   ├── lalr_analysis.cpython-39.pyc
│       │   │   │   │   ├── lalr_interactive_parser.cpython-39.pyc
│       │   │   │   │   ├── lalr_parser.cpython-39.pyc
│       │   │   │   │   └── xearley.cpython-39.pyc
│       │   │   │   └── xearley.py
│       │   │   ├── parse_tree_builder.py
│       │   │   ├── __pycache__
│       │   │   │   ├── ast_utils.cpython-39.pyc
│       │   │   │   ├── common.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── grammar.cpython-39.pyc
│       │   │   │   ├── indenter.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── lark.cpython-39.pyc
│       │   │   │   ├── lexer.cpython-39.pyc
│       │   │   │   ├── load_grammar.cpython-39.pyc
│       │   │   │   ├── parser_frontends.cpython-39.pyc
│       │   │   │   ├── parse_tree_builder.cpython-39.pyc
│       │   │   │   ├── reconstruct.cpython-39.pyc
│       │   │   │   ├── tree.cpython-39.pyc
│       │   │   │   ├── tree_matcher.cpython-39.pyc
│       │   │   │   ├── tree_templates.cpython-39.pyc
│       │   │   │   ├── utils.cpython-39.pyc
│       │   │   │   └── visitors.cpython-39.pyc
│       │   │   ├── __pyinstaller
│       │   │   │   ├── hook-lark.py
│       │   │   │   ├── __init__.py
│       │   │   │   └── __pycache__
│       │   │   │       ├── hook-lark.cpython-39.pyc
│       │   │   │       └── __init__.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── reconstruct.py
│       │   │   ├── tools
│       │   │   │   ├── __init__.py
│       │   │   │   ├── nearley.py
│       │   │   │   ├── __pycache__
│       │   │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   │   ├── nearley.cpython-39.pyc
│       │   │   │   │   ├── serialize.cpython-39.pyc
│       │   │   │   │   └── standalone.cpython-39.pyc
│       │   │   │   ├── serialize.py
│       │   │   │   └── standalone.py
│       │   │   ├── tree_matcher.py
│       │   │   ├── tree.py
│       │   │   ├── tree_templates.py
│       │   │   ├── utils.py
│       │   │   └── visitors.py
│       │   ├── packaging
│       │   │   ├── __about__.py
│       │   │   ├── __init__.py
│       │   │   ├── LICENSE
│       │   │   ├── LICENSE.APACHE
│       │   │   ├── LICENSE.BSD
│       │   │   ├── _manylinux.py
│       │   │   ├── markers.py
│       │   │   ├── _musllinux.py
│       │   │   ├── __pycache__
│       │   │   │   ├── __about__.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── _manylinux.cpython-39.pyc
│       │   │   │   ├── markers.cpython-39.pyc
│       │   │   │   ├── _musllinux.cpython-39.pyc
│       │   │   │   ├── requirements.cpython-39.pyc
│       │   │   │   ├── specifiers.cpython-39.pyc
│       │   │   │   ├── _structures.cpython-39.pyc
│       │   │   │   ├── tags.cpython-39.pyc
│       │   │   │   ├── utils.cpython-39.pyc
│       │   │   │   └── version.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── requirements.py
│       │   │   ├── specifiers.py
│       │   │   ├── _structures.py
│       │   │   ├── tags.py
│       │   │   ├── utils.py
│       │   │   └── version.py
│       │   ├── __pycache__
│       │   │   ├── _pyrsistent_version.cpython-39.pyc
│       │   │   └── typing_extensions.cpython-39.pyc
│       │   ├── pyparsing
│       │   │   ├── actions.py
│       │   │   ├── common.py
│       │   │   ├── core.py
│       │   │   ├── diagram
│       │   │   │   ├── __init__.py
│       │   │   │   └── __pycache__
│       │   │   │       └── __init__.cpython-39.pyc
│       │   │   ├── exceptions.py
│       │   │   ├── helpers.py
│       │   │   ├── __init__.py
│       │   │   ├── LICENSE
│       │   │   ├── __pycache__
│       │   │   │   ├── actions.cpython-39.pyc
│       │   │   │   ├── common.cpython-39.pyc
│       │   │   │   ├── core.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── helpers.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── results.cpython-39.pyc
│       │   │   │   ├── testing.cpython-39.pyc
│       │   │   │   ├── unicode.cpython-39.pyc
│       │   │   │   └── util.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── results.py
│       │   │   ├── testing.py
│       │   │   ├── unicode.py
│       │   │   └── util.py
│       │   ├── pyrsistent
│       │   │   ├── _checked_types.py
│       │   │   ├── _field_common.py
│       │   │   ├── _helpers.py
│       │   │   ├── _immutable.py
│       │   │   ├── __init__.py
│       │   │   ├── LICENSE.mit
│       │   │   ├── _pbag.py
│       │   │   ├── _pclass.py
│       │   │   ├── _pdeque.py
│       │   │   ├── _plist.py
│       │   │   ├── _pmap.py
│       │   │   ├── _precord.py
│       │   │   ├── _pset.py
│       │   │   ├── _pvector.py
│       │   │   ├── __pycache__
│       │   │   │   ├── _checked_types.cpython-39.pyc
│       │   │   │   ├── _field_common.cpython-39.pyc
│       │   │   │   ├── _helpers.cpython-39.pyc
│       │   │   │   ├── _immutable.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── _pbag.cpython-39.pyc
│       │   │   │   ├── _pclass.cpython-39.pyc
│       │   │   │   ├── _pdeque.cpython-39.pyc
│       │   │   │   ├── _plist.cpython-39.pyc
│       │   │   │   ├── _pmap.cpython-39.pyc
│       │   │   │   ├── _precord.cpython-39.pyc
│       │   │   │   ├── _pset.cpython-39.pyc
│       │   │   │   ├── _pvector.cpython-39.pyc
│       │   │   │   ├── _toolz.cpython-39.pyc
│       │   │   │   ├── _transformations.cpython-39.pyc
│       │   │   │   └── typing.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── _toolz.py
│       │   │   ├── _transformations.py
│       │   │   └── typing.py
│       │   ├── _pyrsistent_version.py
│       │   ├── tomlkit
│       │   │   ├── api.py
│       │   │   ├── _compat.py
│       │   │   ├── container.py
│       │   │   ├── exceptions.py
│       │   │   ├── __init__.py
│       │   │   ├── items.py
│       │   │   ├── LICENSE
│       │   │   ├── parser.py
│       │   │   ├── __pycache__
│       │   │   │   ├── api.cpython-39.pyc
│       │   │   │   ├── _compat.cpython-39.pyc
│       │   │   │   ├── container.cpython-39.pyc
│       │   │   │   ├── exceptions.cpython-39.pyc
│       │   │   │   ├── __init__.cpython-39.pyc
│       │   │   │   ├── items.cpython-39.pyc
│       │   │   │   ├── parser.cpython-39.pyc
│       │   │   │   ├── source.cpython-39.pyc
│       │   │   │   ├── toml_char.cpython-39.pyc
│       │   │   │   ├── toml_document.cpython-39.pyc
│       │   │   │   ├── toml_file.cpython-39.pyc
│       │   │   │   └── _utils.cpython-39.pyc
│       │   │   ├── py.typed
│       │   │   ├── source.py
│       │   │   ├── toml_char.py
│       │   │   ├── toml_document.py
│       │   │   ├── toml_file.py
│       │   │   └── _utils.py
│       │   ├── typing_extensions.LICENSE
│       │   ├── typing_extensions.py
│       │   └── vendor.txt
│       └── version
│           ├── exceptions.py
│           ├── grammars
│           │   ├── __init__.py
│           │   ├── markers.lark
│           │   ├── pep508.lark
│           │   └── __pycache__
│           │       └── __init__.cpython-39.pyc
│           ├── helpers.py
│           ├── __init__.py
│           ├── markers.py
│           ├── parser.py
│           ├── pep440
│           │   ├── __init__.py
│           │   ├── parser.py
│           │   ├── __pycache__
│           │   │   ├── __init__.cpython-39.pyc
│           │   │   ├── parser.cpython-39.pyc
│           │   │   ├── segments.cpython-39.pyc
│           │   │   └── version.cpython-39.pyc
│           │   ├── segments.py
│           │   └── version.py
│           ├── __pycache__
│           │   ├── exceptions.cpython-39.pyc
│           │   ├── helpers.cpython-39.pyc
│           │   ├── __init__.cpython-39.pyc
│           │   ├── markers.cpython-39.pyc
│           │   ├── parser.cpython-39.pyc
│           │   └── requirements.cpython-39.pyc
│           └── requirements.py
└── poetry_core-1.2.0.dist-info
    ├── direct_url.json
    ├── INSTALLER
    ├── LICENSE
    ├── METADATA
    ├── RECORD
    ├── REQUESTED
    └── WHEEL

@adamjstewart adamjstewart force-pushed the packages/py-poetry-core branch from 36feb09 to da1f1b8 Compare October 11, 2022 20:54
@alalazo alalazo merged commit 549f636 into spack:develop Oct 12, 2022
@adamjstewart adamjstewart deleted the packages/py-poetry-core branch October 12, 2022 12:44
@climbfuji
Copy link
Copy Markdown
Contributor

@adamjstewart I didn't get to test this before it got merged, but I just cherry-picked the change and it works like a charm. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation issue: py-poetry-core Installation issue: py-pkgconfig needs py-poetry, not py-poetry-core?

4 participants