kconfiglib required by esphome==2021.10.3 #246

Closed
opened 2021-11-08 16:37:16 +01:00 by Xuefer · 3 comments
Traceback (most recent call last):
  File "/usr/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome==2021.10.3', 'console_scripts', 'esphome')())
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main
    return run_esphome(sys.argv)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 391, in command_run
    return show_logs(config, args, port)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 280, in show_logs
    from esphome.components.api.client import run_logs
  File "/usr/lib/python3.9/site-packages/esphome/components/api/client.py", line 6, in <module>
    from aioesphomeapi import APIClient, ReconnectLogic, APIConnectionError, LogLevel
  File "/usr/lib/python3.9/site-packages/aioesphomeapi/__init__.py", line 2, in <module>
    from .client import APIClient
  File "/usr/lib/python3.9/site-packages/aioesphomeapi/client.py", line 15, in <module>
    from google.protobuf import message
  File "/usr/lib/python3.9/site-packages/google/__init__.py", line 1, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'kconfiglib==13.7.1' distribution was not found and is required by esphome
``` Traceback (most recent call last): File "/usr/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome==2021.10.3', 'console_scripts', 'esphome')()) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main return run_esphome(sys.argv) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 391, in command_run return show_logs(config, args, port) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 280, in show_logs from esphome.components.api.client import run_logs File "/usr/lib/python3.9/site-packages/esphome/components/api/client.py", line 6, in <module> from aioesphomeapi import APIClient, ReconnectLogic, APIConnectionError, LogLevel File "/usr/lib/python3.9/site-packages/aioesphomeapi/__init__.py", line 2, in <module> from .client import APIClient File "/usr/lib/python3.9/site-packages/aioesphomeapi/client.py", line 15, in <module> from google.protobuf import message File "/usr/lib/python3.9/site-packages/google/__init__.py", line 1, in <module> __import__('pkg_resources').declare_namespace(__name__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module> def _initialize_master_working_set(): File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master ws.require(__requires__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'kconfiglib==13.7.1' distribution was not found and is required by esphome ```
onkelbeh self-assigned this 2021-11-09 12:22:11 +01:00
onkelbeh added the
requirement
label 2021-11-09 12:22:21 +01:00

Attaching ebuild found (and updated) somewhere in overlays.
But after few iterations I stuck at mising "tzdata" package and discover mess with bunch of them. Unable to create ebuild yet. At this stage I have working UI except logs.

Traceback (most recent call last):
  File "/usr/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome==2021.10.3', 'console_scripts', 'esphome')())
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main
    return run_esphome(sys.argv)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 360, in command_logs
    return show_logs(config, args, port)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 280, in show_logs
    from esphome.components.api.client import run_logs
  File "/usr/lib/python3.9/site-packages/esphome/components/api/client.py", line 6, in <module>
    from aioesphomeapi import APIClient, ReconnectLogic, APIConnectionError, LogLevel
  File "/usr/lib/python3.9/site-packages/aioesphomeapi/__init__.py", line 2, in <module>
    from .client import APIClient
  File "/usr/lib/python3.9/site-packages/aioesphomeapi/client.py", line 15, in <module>
    from google.protobuf import message
  File "/usr/lib/python3.9/site-packages/google/__init__.py", line 1, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'tzdata>=2021.1' distribution was not found and is required by esphome

dev-python/kconfiglib
kconfiglib-13.7.1.ebuild

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{8..10} pypy3 )
PYTHON_REQ_USE="ncurses"
inherit distutils-r1

DESCRIPTION="A flexible Python Kconfig implementation"
HOMEPAGE="https://github.com/ulfalizer/Kconfiglib https://pypi.org/project/kconfiglib/"
SRC_URI="https://github.com/ulfalizer/Kconfiglib/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S=${WORKDIR}/${P^}
# pypi tarballs don't include tests
#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"

python_prepare_all() {
        distutils-r1_python_prepare_all

        # hacks to run tests
        mkdir Kconfiglib || die
        ln -s ../tests Kconfiglib || die
        # don't run kernel Kconfig compat tests
        sed -e 's/run_compatibility_tests()$/#\0/' -i testsuite.py || die
}

python_test() {
        "${EPYTHON}" testsuite.py || die "tests failed with ${EPYTHON}"
}

metadata.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
        <!-- maintainer-needed -->
        <upstream>
                <remote-id type="github">ulfalizer/Kconfiglib</remote-id>
                <remote-id type="pypi">kconfiglib</remote-id>
        </upstream>
</pkgmetadata>
Attaching ebuild found (and updated) somewhere in overlays. But after few iterations I stuck at mising "tzdata" package and discover mess with bunch of them. Unable to create ebuild yet. At this stage I have working UI except logs. ``` Traceback (most recent call last): File "/usr/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome==2021.10.3', 'console_scripts', 'esphome')()) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main return run_esphome(sys.argv) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 360, in command_logs return show_logs(config, args, port) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 280, in show_logs from esphome.components.api.client import run_logs File "/usr/lib/python3.9/site-packages/esphome/components/api/client.py", line 6, in <module> from aioesphomeapi import APIClient, ReconnectLogic, APIConnectionError, LogLevel File "/usr/lib/python3.9/site-packages/aioesphomeapi/__init__.py", line 2, in <module> from .client import APIClient File "/usr/lib/python3.9/site-packages/aioesphomeapi/client.py", line 15, in <module> from google.protobuf import message File "/usr/lib/python3.9/site-packages/google/__init__.py", line 1, in <module> __import__('pkg_resources').declare_namespace(__name__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module> def _initialize_master_working_set(): File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master ws.require(__requires__) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'tzdata>=2021.1' distribution was not found and is required by esphome ``` dev-python/kconfiglib kconfiglib-13.7.1.ebuild ``` # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python3_{8..10} pypy3 ) PYTHON_REQ_USE="ncurses" inherit distutils-r1 DESCRIPTION="A flexible Python Kconfig implementation" HOMEPAGE="https://github.com/ulfalizer/Kconfiglib https://pypi.org/project/kconfiglib/" SRC_URI="https://github.com/ulfalizer/Kconfiglib/archive/v${PV}.tar.gz -> ${P}.tar.gz" S=${WORKDIR}/${P^} # pypi tarballs don't include tests #SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="ISC" SLOT="0" KEYWORDS="~amd64 ~x86" python_prepare_all() { distutils-r1_python_prepare_all # hacks to run tests mkdir Kconfiglib || die ln -s ../tests Kconfiglib || die # don't run kernel Kconfig compat tests sed -e 's/run_compatibility_tests()$/#\0/' -i testsuite.py || die } python_test() { "${EPYTHON}" testsuite.py || die "tests failed with ${EPYTHON}" } ``` metadata.xml ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> <upstream> <remote-id type="github">ulfalizer/Kconfiglib</remote-id> <remote-id type="pypi">kconfiglib</remote-id> </upstream> </pkgmetadata> ```

Quick and dirty ebuild for dev-python/tzdata created from pytz below.
To make logging work we must have aioesphomeapi 9.1.5 installed.

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{8..9} )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=pyproject.toml

inherit distutils-r1

DESCRIPTION="Python package wrapping the IANA time zone database"
HOMEPAGE="https://github.com/python/tzdata https://pypi.org/project/tzdata/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

#DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND="app-arch/unzip"

python_prepare_all() {
        distutils-r1_python_prepare_all
}

#python_test() {
#	"${EPYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
#}

Quick and **dirty** ebuild for dev-python/tzdata created from pytz below. To make logging work we must have [aioesphomeapi 9.1.5](https://github.com/esphome/issues/issues/2604#issuecomment-958313442) installed. ``` # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python3_{8..9} ) PYTHON_REQ_USE="threads(+)" DISTUTILS_USE_SETUPTOOLS=pyproject.toml inherit distutils-r1 DESCRIPTION="Python package wrapping the IANA time zone database" HOMEPAGE="https://github.com/python/tzdata https://pypi.org/project/tzdata/" SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 x86" IUSE="" #DEPEND="" RDEPEND="${DEPEND}" BDEPEND="app-arch/unzip" python_prepare_all() { distutils-r1_python_prepare_all } #python_test() { # "${EPYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}" #} ```
Owner

added matching kconfiglib with 5caf018b,
anyway should be all fixed with esphome-2021.11.1

added matching kconfiglib with 5caf018b, anyway should be all fixed with esphome-2021.11.1
Sign in to join this conversation.
No Label
Bug
Bump/Update
Cleanup
Dupe
Enhancement
File Collision
Forked
help wanted
Integration: accuweather
Integration: acmeda
Integration: acomax
Integration: adax
Integration: adguard
Integration: aemet
Integration: aep_ohio
Integration: aep_texas
Integration: airq
Integration: airthings
Integration: airthings_ble
Integration: airtouch5
Integration: airzone
Integration: airzone_cloud
Integration: amazon_polly
Integration: amberelectric
Integration: ambient_station
Integration: analytics_insights
Integration: anel_pwrctrl
Integration: aosmith
Integration: apache_kafka
Integration: apcupsd
Integration: appalachianpower
Integration: apprise
Integration: aprilaire
Integration: aranet
Integration: aseko_pool_live
Integration: asuswrt
Integration: august
Integration: aws
Integration: axis
Integration: backup
Integration: bang_olufsen
Integration: blebox
Integration: blink
Integration: bluetooth
Integration: blue_current
Integration: bmw_connected_drive
Integration: bosch_shc
Integration: bring
Integration: brother
Integration: brottsplatskartan
Integration: bsblan
Integration: bthome
Integration: caldav
Integration: cast
Integration: ccm15
Integration: cloud
Integration: cloudflare
Integration: co2signal
Integration: coautilities
Integration: comelit
Integration: conversation
Integration: debugpy
Integration: deconz
Integration: deluge
Integration: denonavr
Integration: devialet
Integration: devolo_home_control
Integration: dhcp
Integration: discord
Integration: discovergy
Integration: dlna_dmr
Integration: dlna_dms
Integration: doods
Integration: drop_connect
Integration: dsmr
Integration: duotecno
Integration: duquesne_light
Integration: dwd_weather_warnings
Integration: easyenergy
Integration: ecobee
Integration: ecoforest
Integration: ecovacs
Integration: ecowitt
Integration: elgato
Integration: elvia
Integration: energyzero
Integration: enigma2
Integration: enphase_envoy
Integration: epion
Integration: esphome
Integration: evohome
Integration: ffmpeg
Integration: fjaraskupan
Integration: flexit_bacnet
Integration: flipr
Integration: forecast_solar
Integration: foscam
Integration: fritzbox
Integration: fronius
Integration: frontend
Integration: fujitsu_anywair
Integration: fyta
Integration: garages_amsterdam
Integration: gardena_bluetooth
Integration: gdacs
Integration: generic
Integration: geonetnz_quakes
Integration: geonetnz_volcano
Integration: geo_json_events
Integration: geo_rss_events
Integration: gios
Integration: glances
Integration: goodwe
Integration: google
Integration: google_assistant_sdk
Integration: google_generative_ai_conversation
Integration: govee_ble
Integration: govee_light_local
Integration: hive
Integration: hko
Integration: holiday
Integration: homekit_controller
Integration: homematicip_cloud
Integration: homewizard
Integration: honeywell
Integration: hp_ilo
Integration: html5
Integration: http
Integration: hue
Integration: hunterdouglas_powerview
Integration: husqvarna_automower
Integration: huum
Integration: hydrawise
Integration: iammeter
Integration: ibeacon
Integration: idasen_desk
Integration: ign_sismologia
Integration: image_upload
Integration: indianamichiganpower
Integration: insteon
Integration: ipp
Integration: islamic_prayer_times
Integration: justnimbus
Integration: jvc_projector
Integration: kef
Integration: kentuckypower
Integration: keymitt_ble
Integration: knx
Integration: kostal_plenticore
Integration: krispol
Integration: lamarzocco
Integration: ld2410_ble
Integration: leaone
Integration: led_ble
Integration: life360
Integration: lifx
Integration: linear_garage_door
Integration: litejet
Integration: litterrobot
Integration: local_calendar
Integration: local_todo
Integration: loqed
Integration: luci
Integration: lupusec
Integration: lutron
Integration: lutron_caseta
Integration: madeco
Integration: mastodon
Integration: matrix
Integration: matter
Integration: media_extractor
Integration: melcloud
Integration: met
Integration: meteoclimatic
Integration: meteo_france
Integration: metoffice
Integration: microbees
Integration: mill
Integration: minecraft_server
Integration: modbus
Integration: mopeka
Integration: motionblinds_ble
Integration: motionmount
Integration: motion_blinds
Integration: myuplink
Integration: nam
Integration: neato
Integration: netatmo
Integration: nexia
Integration: nextbus
Integration: nextcloud
Integration: nextdns
Integration: nibe_heatpump
Integration: nmap_tracker
Integration: nobo_hub
Integration: norway_air
Integration: notion
Integration: nsw_rural_fire_service_feed
Integration: nuki
Integration: numato
Integration: nut
Integration: nws
Integration: ollama
Integration: oncue
Integration: ondilo_ico
Integration: openai_conversation
Integration: openerz
Integration: open_meteo
Integration: opower
Integration: orvibo
Integration: osoenergy
Integration: otbr
Integration: ourgroceries
Integration: overkiz
Integration: p1_monitor
Integration: pegel_online
Integration: permobil
Integration: plex
Integration: plugwise
Integration: powerwall
Integration: private_ble_device
Integration: proxy
Integration: prusalink
Integration: psoklahoma
Integration: pure_energie
Integration: pvoutput
Integration: qingping
Integration: qld_bushfire
Integration: qrcode
Integration: rabbitair
Integration: rachio
Integration: radio_browser
Integration: rainbird
Integration: rainforest_raven
Integration: rainmachine
Integration: rdw
Integration: recorder
Integration: refoss
Integration: renault
Integration: renson
Integration: reolink
Integration: rflink
Integration: rfxtrx
Integration: ridwell
Integration: ring
Integration: risco
Integration: roborock
Integration: roku
Integration: romy
Integration: roomba
Integration: roon
Integration: route53
Integration: rova
Integration: samsam
Integration: samsungtv
Integration: schlage
Integration: scl
Integration: screenlogic
Integration: sensibo
Integration: sensorpush
Integration: sentry
Integration: seven_segments
Integration: sfr_box
Integration: shelly
Integration: sighthound
Integration: signal_messenger
Integration: simplisafe
Integration: sleepiq
Integration: slimproto
Integration: smarttub
Integration: smud
Integration: snmp
Integration: songpal
Integration: sonos
Integration: sql
Integration: squeezebox
Integration: ssdp
Integration: subaru
Integration: suez_water
Integration: sunweg
Integration: surepetcare
Integration: swepco
Integration: swiss_public_transport
Integration: switchbot
Integration: switchbot_cloud
Integration: switcher_kis
Integration: system_bridge
Integration: tado
Integration: tailwind
Integration: tankerkoenig
Integration: tasmota
Integration: technove
Integration: tedee
Integration: telegram_bot
Integration: temper
Integration: tensorflow
Integration: teslemetry
Integration: tessie
Integration: thermobeacon
Integration: thermopro
Integration: thread
Integration: tile
Integration: tolo
Integration: tplink
Integration: tplink_omada
Integration: tplink_tapo
Integration: traccar
Integration: traccar_server
Integration: trafikverket_camera
Integration: trafikverket_ferry
Integration: trafikverket_train
Integration: trafikverket_weatherstation
Integration: transmission
Integration: tuya
Integration: twentemilieu
Integration: unifi
Integration: unifiprotect
Integration: unifi_direct
Integration: upnp
Integration: usgs_earthquakes_feed
Integration: utility_meter
Integration: v2c
Integration: vallox
Integration: valve
Integration: velbus
Integration: velux
Integration: vicare
Integration: vilfo
Integration: vodafone_station
Integration: vulcan
Integration: wallbox
Integration: waqi
Integration: waze_travel_time
Integration: weatherflow_cloud
Integration: weatherkit
Integration: webmin
Integration: webostv
Integration: wemo
Integration: whirlpool
Integration: withings
Integration: wolflink
Integration: workday
Integration: wyoming
Integration: xiaomi_ble
Integration: yalexs_ble
Integration: yeelight
Integration: yolink
Integration: zamg
Integration: zeroconf
Integration: zha
Integration: zhong_hong
Integration: zondergas
Integration: zoneminder
Integration: zwave_js
invalid
New Integration
Python 3.10
Python 3.11
question
requirement
Requirement vanished
slot-conflict
Source Incomplete
SrcDir ${S} mismatch
TopLevelViolation
Update required
virtual
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: onkelbeh/HomeAssistantRepository#246
No description provided.