thesimj / envyaml

Simple YAML configuration file parser
MIT License
78 stars 21 forks source link

Dependency issue #11

Closed tonsV2 closed 3 years ago

tonsV2 commented 3 years ago

I'm not sure if this is a problem within this project or something I need to fix in mine. So please excuse me if it's on my behalf.

setup.py

import os

from setuptools import setup

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name='kubewatcher',
    version='1.1.0',
    description='See https://github.com/tonsV2/kubewatcher',
    python_requires='>=3.8',
    py_modules=['kubewatcher'],
    packages=['config', 'handlers', 'path_extractor'],
    install_requires=[
        'kubernetes==12.0.1',
        'ruamel.yaml==0.16.12',
#        'envyaml==1.1.201222'
        'envyaml @ https://github.com/thesimj/envyaml/archive/1.2.201222.tar.gz',

    ],
    entry_points='''
        [console_scripts]
        kubewatcher=kubewatcher:cli
    ''',
    long_description=read('README.md'),
)

I did a clean checkout of my project and ran pip which resulted in the below error

>>> pip install --editable .
Obtaining file:///home/tons/IdeaProjects/pykubewatcher
Collecting kubernetes==12.0.1
  Using cached kubernetes-12.0.1-py2.py3-none-any.whl (1.7 MB)
Collecting ruamel.yaml==0.16.12
  Using cached ruamel.yaml-0.16.12-py2.py3-none-any.whl (111 kB)
Collecting envyaml@ https://github.com/thesimj/envyaml/archive/1.2.201222.tar.gz
  Downloading https://github.com/thesimj/envyaml/archive/1.2.201222.tar.gz
     \ 9.3 kB 11.3 MB/s
    ERROR: Command errored out with exit status 1:
     command: /home/tons/IdeaProjects/pykubewatcher/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4n7pws6l/envyaml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4n7pws6l/envyaml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-tbbl93vd
         cwd: /tmp/pip-install-4n7pws6l/envyaml/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4n7pws6l/envyaml/setup.py", line 4, in <module>
        from envyaml import __version__
      File "/tmp/pip-install-4n7pws6l/envyaml/envyaml/__init__.py", line 1, in <module>
        from .envyaml import EnvYAML, __version__
      File "/tmp/pip-install-4n7pws6l/envyaml/envyaml/envyaml.py", line 27, in <module>
        from yaml import safe_load
    ModuleNotFoundError: No module named 'yaml'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.3.3 is available.
You should consider upgrading via the '/home/tons/IdeaProjects/pykubewatcher/venv/bin/python -m pip install --upgrade pip' command.

If I disable envyaml (by prefixing with #) and then run it so ruamel.yaml will be installed. And then again enable it and run again it works. I'm guessing there's some transitive dependency issue but I'm not sure.

Thanks for a quick reaction regarding issue #9

thesimj commented 3 years ago

EnvYaml requires PyYAML as dependencies. Found issue and ready to fixit it in new version soon. Thanks

thesimj commented 3 years ago

latest code you could try from develop branch

thesimj commented 3 years ago

Resolve this issue in new version https://github.com/thesimj/envyaml/tree/1.3.201225

Please validate.