anaynayak / buildnotify

A system tray based build status notification app for cctray.xml feeds.

Home Page:https://anaynayak.github.io/buildnotify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to build using any of your instructions

pracplayopen opened this issue · comments

Trying to build latest version to see if authenticated cruise control logins are now supported (don't seem to be in ubuntu package).

Tried both methods in your instructions and several variations, no luck.

PIP

$ pip install buildnotify --pre
# works fine
$ ~/.local/bin/buildnotifyapplet.py
Traceback (most recent call last):
  File "/home/sanjay/.local/bin/buildnotifyapplet.py", line 2, in <module>
    import buildnotifylib
  File "/home/sanjay/.local/lib/python3.5/site-packages/buildnotifylib/__init__.py", line 1, in <module>
    from buildnotifylib.buildnotify import BuildNotify   # NOQA
  File "/home/sanjay/.local/lib/python3.5/site-packages/buildnotifylib/buildnotify.py", line 5, in <module>
    from buildnotifylib.app_notification import AppNotification
  File "/home/sanjay/.local/lib/python3.5/site-packages/buildnotifylib/app_notification.py", line 15
    self.integration_status: Optional[OverallIntegrationStatus] = None
                           ^
SyntaxError: invalid syntax

SOURCE:

$ git clone https://github.com/anaynayak/buildnotify
$ cd buildnotify
 $ virtualenv -p python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/sanjay/work/src/buildnotify/venv/bin/python3
Not overwriting existing python script /home/sanjay/work/src/buildnotify/venv/bin/python (you must use /home/sanjay/work/src/buildnotify/venv/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...done.
sanjay@erdos ~/src/buildnotify $ source venv/bin/activate.fish
-bash: venv/bin/activate.fish: line 4: syntax error near unexpected token `-d'
-bash: venv/bin/activate.fish: line 4: `function deactivate -d 'Exit virtualenv mode and return to the normal environment.''

LOCAL PACKAGE:

$ sudo python3 setup.py install
# works fine
$ /usr/local/bin/buildnotifyapplet.py &
$ Traceback (most recent call last):
  File "/usr/local/bin/buildnotifyapplet.py", line 4, in <module>
    __import__('pkg_resources').run_script('BuildNotify==2.1.0', 'buildnotifyapplet.py')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 719, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1511, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.5/dist-packages/BuildNotify-2.1.0-py3.5.egg/EGG-INFO/scripts/buildnotifyapplet.py", line 2, in <module>
    # EASY-INSTALL-SCRIPT: 'BuildNotify==2.1.0','buildnotifyapplet.py'
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/local/lib/python3.5/dist-packages/BuildNotify-2.1.0-py3.5.egg/buildnotifylib/__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/local/lib/python3.5/dist-packages/BuildNotify-2.1.0-py3.5.egg/buildnotifylib/buildnotify.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 896, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1139, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1115, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1096, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 533, in spec_from_file_location
  File "/usr/local/lib/python3.5/dist-packages/BuildNotify-2.1.0-py3.5.egg/buildnotifylib/app_notification.py", line 15
    self.integration_status: Optional[OverallIntegrationStatus] = None

It seems you are using Python 3.5 which does have support for typing so I don't understand why it should fail with a syntax error.

Also, Python 3.5 has reached end of life, can you try with a newer version of Python?
Alternatively you can try installing the snap from https://snapcraft.io/install/buildnotify-test/ubuntu.

it gives the same error on python 3.5 and python 3.8.

is it possible this error could've been generated starting it via remote x11 session?

since i opened this ticket i got a new laptop. this time i did a simpler install:

pip install buildnotify #worked without --pre
~/.local/bin/buildnotifyapplet.py &

this worked right away, i got authentication support which was why i'm upgrading (though it was unable to read my previous config file, had to recreate).

i'm going to close this ticket.

thanks again for your help and hard work on the project!