-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Create conda-based application installer for macOS and Linux #19461
Conversation
So, I'm having trouble building the Error Traceback (most recent call last):
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
self.run_setup()
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 9, in <module>
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/dist.py", line 476, in __init__
_Distribution.__init__(
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 280, in __init__
self.finalize_options()
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools/dist.py", line 900, in finalize_options
ep(self)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools_scm/integration.py", line 123, in infer_version
_assign_version(dist, config)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools_scm/integration.py", line 62, in _assign_version
_version_missing(config)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 109, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/work.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python /Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpthdb46ws
cwd: /Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/work
Preparing metadata (pyproject.toml): finished with status 'error'
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Exception information:
Traceback (most recent call last):
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/operations/build/metadata.py", line 35, in generate_metadata
distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 706, in prepare_metadata_for_build_wheel
return super().prepare_metadata_for_build_wheel(
File "$PREFIX/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 188, in prepare_metadata_for_build_wheel
return self._call_hook('prepare_metadata_for_build_wheel', {
File "$PREFIX/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 322, in _call_hook
self._subprocess_runner(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/utils/subprocess.py", line 252, in runner
call_subprocess(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
raise error
pip._internal.exceptions.InstallationSubprocessError: Preparing metadata (pyproject.toml) exited with 1
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 369, in run
requirement_set = resolver.resolve(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
req = self._make_requirement_from_install_req(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
super().__init__(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
self.dist = self._prepare()
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 438, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 524, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 68, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 61, in prepare_distribution_metadata
self.req.prepare_metadata()
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 533, in prepare_metadata
self.metadata_directory = generate_metadata(
File "$PREFIX/lib/python3.10/site-packages/pip/_internal/operations/build/metadata.py", line 37, in generate_metadata
raise MetadataGenerationFailed(package_details=details) from error
pip._internal.exceptions.MetadataGenerationFailed: metadata generation failed
Removed file://$SRC_DIR from build tracker '/private/tmp/pip-build-tracker-4g4fih3v'
Removed build tracker: '/private/tmp/pip-build-tracker-4g4fih3v'
Traceback (most recent call last):
File "/Users/rclary/opt/mambaforge/envs/spy-inst/bin/conda-mambabuild", line 10, in <module>
sys.exit(main())
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/boa/cli/mambabuild.py", line 239, in main
call_conda_build(action, config)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/boa/cli/mambabuild.py", line 211, in call_conda_build
result = api.build(
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/conda_build/api.py", line 186, in build
return build_tree(
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/conda_build/build.py", line 3091, in build_tree
packages_from_this = build(metadata, stats,
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/conda_build/build.py", line 2214, in build
utils.check_call_env(cmd, env=env, rewrite_stdout_env=rewrite_env,
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/conda_build/utils.py", line 412, in check_call_env
return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
File "/Users/rclary/opt/mambaforge/envs/spy-inst/lib/python3.9/site-packages/conda_build/utils.py", line 392, in _func_defaulting_env_to_os_environ
raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/Users/rclary/opt/mambaforge/envs/spy-inst/conda-bld/python-lsp-server_1663626470544/work/conda_build.sh']' returned non-zero exit status 1. Using the
I do not have any issues building conda packages from any of the other The question, then, is how best to proceed? Is there a way to make conda-build work with local subrepos in a robust way? I don't see a way to make this work and the only way forward that I can see is to provide a fully intact local git repository. Providing the Github repo url is convenient, since it doesn't change, but it won't have developer changes, so it's useless for the developer build. A local repository will have the developer's changes, but could be anywhere so it must be another parameter; similarly, a forked github repo will have developer changes, but must be another parameter. This seems particularly obnoxious to me since the all the changes and information is right there in the subrepo, but @spyder-ide/core-developers if you have any suggestions or further insight, I'd appreciate it. meta.yaml{% set name = "python-lsp-server" %}
{% set version = "1.5.0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
- path: /Users/rclary/Documents/Repos/Spyder-IDE/spyder/external-deps/python-lsp-server
build:
number: 0
noarch: python
script: {{ PYTHON }} -m pip install . --no-deps -vv
entry_points:
- pylsp = pylsp.__main__:main
requirements:
host:
- python >=3.7
- pip
# Needed at build time to produce a package with the correct version for pip
# See https://github.com/pypa/setuptools_scm/issues/636#issuecomment-1026435048
- setuptools_scm
run:
- autopep8 >=1.6.0,<1.7.0
- flake8 >=4.0.0,<4.1.0
- jedi >=0.17.2,<0.19
- mccabe >=0.6.0,<0.7.0
- pluggy >=1.0.0
- python-lsp-jsonrpc >=1.0.0
- pycodestyle >=2.8.0,<2.9.0
- pydocstyle >=2.0.0
- pyflakes >=2.4.0,<2.5.0
- pylint >=2.5.0
- python >=3.7
- rope >=0.10.5
- setuptools >=39.0.0
- ujson >=3.0
- whatthepatch
- yapf
about:
home: https://github.com/python-lsp/python-lsp-server
license: MIT
license_family: MIT
license_file: LICENSE
summary: An implementation of the Language Server Protocol for Python
description: |
A Python 3.7+ implementation of the Language Server Protocol
making use of Jedi, pycodestyle, Pyflakes and YAPF.
dev_url: https://github.com/python-lsp/python-lsp-server
extra:
recipe-maintainers:
- ccordoba12
- andfoy
- steff456 |
Not sure, but checking seems like there is a way to setup a version value via the environment variable |
@dalthviz @ccordoba12, That was a good idea; unfortunately, I still get the same error. I think the best solution I've come with so far is to just |
Ok, that's a good idea too. |
See, e.g., conda-forge/twine-feedstock#52 ; did you add the correct versions of |
Nevertheless, adding the constraints does not affect anything.
You changed the
I've set this environment variable without affect, although I don't know what the parenthetical statement means. |
Sorry for the confusion, I didn't read carefully, and rather just noticed that Basically, what seems to be happening is since unlike As you discovered, it still works with sdists (like on Conda Forge) because evidently There's also |
To recap from our meeting, you can get the version that |
385bb09
to
1b1ae2c
Compare
@spyder-ide/core-developers, the first successful build artifact for macOS is now up. Please test at your leisure and let me know what you think and what issues you find. @CAM-Gerlach, thanks for pointing me to |
ba684f4
to
caf9fa7
Compare
…dError: [WinError 206] The filename or extension is too long" on Windows
- Include lite option for package installer - include paramiko and pyxdg
- Matrix build job uses new output paradigm
Ensure build-installers runs, even on release when build-noarch-conda-pkgs does not run Do not download local conda package artifacts on release
Is something missing here @mrclary @ccordoba12 ? Or is okay if I merge this? |
@dalthviz, I'm working on my review right now. |
@CAM-Gerlach, do you want to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrclary!! You've done a fantastic work here!
I left a very lightweight review for you, otherwise looks good to me.
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrclary for all your hard work to add these new, conda-based installers for Spyder! It's a great improvement!
Yay! 🚀 |
Thank you so much @jaimergp for all the info and help you provided us to move forward this :) |
Description of Changes
Creates installers for conda-based standalone applications for macOS, Windows, and Linux.
The installers created by this PR are experimental, at least until the release of Spyder 6.0. They will be produced in addition to the existing macOS and Windows installers.
Given the experimental nature of these installers, any changes required in Spyder's core source code will be made in a separate branch, and a patch supplied in this PR. In this way, no changes will be made to Spyder's core source code by this PR; the patch is applied to Spyder's conda package built for this installer only. There will be no affect on Spyder's conda package uploaded to conda-forge, nor it existing macOS or Windows installers.
The objectives of this PR are:
The Linux and Windows installers will come in follow-up PRs. A non-blocking workflow action will permit continued development on the experimental installers without blocking other pull requests.
At present, this package installer only works on x86 architecture. A subsequent PR will add arm64 to the matrix workflow.
Issue(s) Resolved
Fixes #18870
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: @mrclary