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

Unwanted dependency on graphical packages due to PyGObject #134

Closed
urucoder opened this issue Aug 9, 2024 · 7 comments
Closed

Unwanted dependency on graphical packages due to PyGObject #134

urucoder opened this issue Aug 9, 2024 · 7 comments
Labels
question Further information is requested

Comments

@urucoder
Copy link

urucoder commented Aug 9, 2024

Hey folks, I realized that since version 1.1.0 this package add dependency on PyGObject, it is a graphical oriented package which add a bunch of dependencies on xorg-* packages, this is not wanted in service environments where no graphical interface is present.

Is there any option to make this dependency optional?

@rayluo rayluo added the question Further information is requested label Aug 9, 2024
@rayluo
Copy link
Contributor

rayluo commented Aug 9, 2024

I realized that since version 1.1.0 this package add dependency on PyGObject

Can you elaborate which part between 1.0.0 and 1.1.0 introduced that dependency?

Actually, PyGObject was no longer a hard dependency since 0.2.1.

PyGObject is used in this library for token encryption. If you use this library in "service environments", you may not need encryption at all. See also this sample snippet.

@urucoder
Copy link
Author

Hey @rayluo thanks for the quick reply and the code references.
Checked the package in pypi and you're right, the problem is in the conda-forge package, is it a community package, or officially maintained? I'm not directly using it, it's being installed as a dependency for azure-kusto-data=4.5.1

Here's the installed dependencies for version 1.1.0 from the conda-forge package.

$ conda create -n msal_test -c conda-forge msal_extensions=1.1.0
Channels:                                                                                                                                                                                             
 - conda-forge                                                                                                                                                                                        
 - defaults                                                                                                                                                                                           
Platform: linux-64                                                                                                                                                                                    
Collecting package metadata (repodata.json): done                                                                                                                                                     
Solving environment: done                                                                                                                                                                             
                      
## Package Plan ##

  environment location: /opt/conda/envs/msal_test

  added / updated specs:
    - msal_extensions=1.1.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cairo-1.18.0               |       hebfffa5_3         961 KB  conda-forge
    expat-2.6.2                |       h59595ed_0         134 KB  conda-forge
    font-ttf-dejavu-sans-mono-2.37|       hab24e00_0         388 KB  conda-forge
    font-ttf-inconsolata-3.000 |       h77eed37_0          94 KB  conda-forge
    font-ttf-source-code-pro-2.038|       h77eed37_0         684 KB  conda-forge
    font-ttf-ubuntu-0.83       |       h77eed37_2         1.5 MB  conda-forge
    fontconfig-2.14.2          |       h14ed4e7_0         266 KB  conda-forge
    fonts-conda-ecosystem-1    |                0           4 KB  conda-forge
    fonts-conda-forge-1        |                0           4 KB  conda-forge
    freetype-2.12.1            |       h267a509_2         620 KB  conda-forge
    gettext-0.22.5             |       he02047a_3         468 KB  conda-forge
    gettext-tools-0.22.5       |       he02047a_3         2.6 MB  conda-forge
    icu-75.1                   |       he02047a_0        11.6 MB  conda-forge
    libasprintf-0.22.5         |       he8f35ee_3          42 KB  conda-forge
    libasprintf-devel-0.22.5   |       he8f35ee_3          33 KB  conda-forge
    libgcrypt-1.11.0           |       h4ab18f5_1         668 KB  conda-forge
    libgettextpo-0.22.5        |       he02047a_3         167 KB  conda-forge
    libgettextpo-devel-0.22.5  |       he02047a_3          36 KB  conda-forge
    libgirepository-1.80.1     |       h003a4f0_0         123 KB  conda-forge
    libglib-2.80.3             |       h315aac3_2         3.7 MB  conda-forge
    libgpg-error-1.50          |       h4f305b6_0         267 KB  conda-forge
    libiconv-1.17              |       hd590300_2         689 KB  conda-forge
    libpng-1.6.43              |       h2797004_0         281 KB  conda-forge
    libsecret-0.18.8           |       h329b89f_2         1.3 MB  conda-forge
    libxcb-1.16                |       hd590300_0         386 KB  conda-forge
    msal_extensions-1.1.0      |  py312h7900ff3_1          37 KB  conda-forge
    packaging-24.1             |     pyhd8ed1ab_0          49 KB  conda-forge
    pcre2-10.44                |       hba22ea6_2         930 KB  conda-forge
    pixman-0.43.2              |       h59595ed_0         378 KB  conda-forge
    pthread-stubs-0.4          |    h36c2ea0_1001           5 KB  conda-forge
    pycairo-1.26.1             |  py312h3bc4990_0         114 KB  conda-forge
    pygobject-3.48.2           |  py312h15a1d3f_0         324 KB  conda-forge
    xorg-kbproto-1.0.7         |    h7f98852_1002          27 KB  conda-forge
    xorg-libice-1.1.1          |       hd590300_0          57 KB  conda-forge
    xorg-libsm-1.2.4           |       h7391055_0          27 KB  conda-forge
    xorg-libx11-1.8.9          |       hb711507_1         813 KB  conda-forge
    xorg-libxau-1.0.11         |       hd590300_0          14 KB  conda-forge
    xorg-libxdmcp-1.1.3        |       h7f98852_0          19 KB  conda-forge
    xorg-libxext-1.3.4         |       h0b41bf4_2          49 KB  conda-forge
    xorg-libxrender-0.9.11     |       hd590300_0          37 KB  conda-forge
    xorg-renderproto-0.11.1    |    h7f98852_1002           9 KB  conda-forge
    xorg-xextproto-7.3.0       |    h0b41bf4_1003          30 KB  conda-forge
    xorg-xproto-7.0.31         |    h7f98852_1007          73 KB  conda-forge
    zlib-1.3.1                 |       h4ab18f5_1          91 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        30.0 MB

@rayluo
Copy link
Contributor

rayluo commented Aug 17, 2024

Checked the package in pypi and you're right, the problem is in the conda-forge package, is it a community package, or officially maintained?

@xiangyan99 kindly helped us ship that conda package. I'll defer to him to answer whether PyGObject was intended to be included. My understanding is that conda packages tend to include all the dependencies so that the app developers do not need to worry about installing dependencies, regardless of whether they are optional.

@xiangyan99
Copy link

@urucoder https://anaconda.org/microsoft/msal-extensions is our official conda repo.

Did you have a chance to try this one?

@urucoder
Copy link
Author

Hey, just checked the official package and doesn't contain the PyGObject dependency, closing this issue given the conda-forge package isn't officially maintained, thanks for your help

@rayluo
Copy link
Contributor

rayluo commented Aug 20, 2024

Interesting. I know that our PyPI package contains no PyGObject but then the issue is our users have no easy way to install PyGObject when they want to. I thought a conda package would contain all dependencies which shall be harmless even when some users do not really need PyGObject.

@xiangyan99
Copy link

Interesting. I know that our PyPI package contains no PyGObject but then the issue is our users have no easy way to install PyGObject when they want to. I thought a conda package would contain all dependencies which shall be harmless even when some users do not really need PyGObject.

PyGObject is only needed for Linux and there is no PyGObject installer on anaconda main.

We encourage users to install PyGObject from conda forge if they need.

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

No branches or pull requests

3 participants