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

bugs #18065

Open
anylayer opened this issue Jan 6, 2025 · 1 comment
Open

bugs #18065

anylayer opened this issue Jan 6, 2025 · 1 comment

Comments

@anylayer
Copy link

anylayer commented Jan 6, 2025

Description

Title:

check_dependencies.check_requirements() Fails with Correct Dependencies in maturin-Built Package, Program Runs After Commenting It Out

Description:

I have successfully built and installed matrix-synapse from source using maturin, and all dependencies seem to be correctly installed and configured. However, when running the server, the check_dependencies.check_requirements() function fails, despite all the necessary dependencies being present in the environment.

After commenting out the check_dependencies.check_requirements() function, the program starts and runs without any issues.

Steps to Reproduce:

  1. Build matrix-synapse from source using maturin:
    maturin develop 
    
    

Steps to reproduce

  • list the steps
  • that reproduce the bug
  • using hyphens as bullet points

Homeserver

customs

Synapse Version

1.121.1

Installation Method

Other (please mention below)

Database

postgresql

Workers

Single process

Platform

ubuntu

Configuration

genernal config

Relevant log output

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/root/.pyenv/versions/synapse/lib/python3.10/site-packages/synapse/app/__init__.py", line 30, in <module>
    check_dependencies.check_requirements()
  File "/root/.pyenv/versions/synapse/lib/python3.10/site-packages/synapse/util/check_dependencies.py", line 190, in check_requirements
    for requirement, must_be_installed in dependencies:
  File "/root/.pyenv/versions/synapse/lib/python3.10/site-packages/synapse/util/check_dependencies.py", line 95, in _generic_dependencies
    requirements = metadata.requires(DISTRIBUTION_NAME)
  File "/root/.pyenv/versions/3.10.15/lib/python3.10/importlib/metadata/__init__.py", line 1040, in requires
    return distribution(distribution_name).requires
  File "/root/.pyenv/versions/3.10.15/lib/python3.10/importlib/metadata/__init__.py", line 969, in distribution
    return Distribution.from_name(distribution_name)
  File "/root/.pyenv/versions/3.10.15/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for matrix-synapse

Anything else that would be useful to know?

No response

@reivilibre
Copy link
Contributor

Have you executed poetry install first?
When I've seen people using maturin develop it's within the context of already having run poetry install first, which is our primary way of developing on the code.

As far as I know maturin develop is only favoured when changing the Rust code during development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants