Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

Add distro support for Fedora 20 #171

Open
brianredbeard opened this issue May 21, 2014 · 5 comments
Open

Add distro support for Fedora 20 #171

brianredbeard opened this issue May 21, 2014 · 5 comments

Comments

@brianredbeard
Copy link

environment.py lacks the proper path to discover Arduino's version.txt file.

@brianredbeard
Copy link
Author

output when you attempt to run:

[bharrington@ushi-oni-acor-to lirasp]$ rpm -ql arduino-core | grep -i version
/usr/share/arduino/lib/version.txt
[bharrington@ushi-oni-acor-to lirasp]$ ino build
Traceback (most recent call last):
  File "/usr/bin/ino", line 6, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/ino/runner.py", line 76, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/ino/commands/build.py", line 282, in run
    self.setup_flags(args)
  File "/usr/lib/python2.7/site-packages/ino/commands/build.py", line 154, in setup_flags
    '-DARDUINO=' + str(self.e.arduino_lib_version.as_int()),
  File "/usr/lib/python2.7/site-packages/ino/environment.py", line 62, in as_int
    return self.major * 100 + self.minor * 10 + self.build
IndexError: tuple index out of range

@brianredbeard
Copy link
Author

Strike that, more debugging shows that the first two fields are being parsed.

@hroncok
Copy link

hroncok commented Jun 24, 2014

Just got the very same traceback. What's wrong?

charlesbrandt pushed a commit to charlesbrandt/ino that referenced this issue Aug 18, 2014
…ialized properly due to name overlap with arduiono_lib_version() property. changed attribute name to _arduino_lib_version to avoid naming conflict
@charlesbrandt
Copy link

I ran into this too. In ino/environment.py there is a property arduino_lib_version that is supposed to initialize an attribute of the same name. When it checks if it exists already, it finds the property name and never initializes the attribute. Here's an updated version that seems to fix it for me:

@property
def arduino_lib_version(self):
    self.find_arduino_file('version.txt', ['lib'],
                           human_name='Arduino lib version file (version.txt)')

    if '_arduino_lib_version' not in self:
        with open(self['version.txt']) as f:
            print 'Detecting Arduino software version ... ',
            v_string = f.read().strip()
            v = Version.parse(v_string)
            self['_arduino_lib_version'] = v
            print colorize("%s (%s)" % (v, v_string), 'green')

    return self['_arduino_lib_version']

I made a pull request here:
#195

@charlesbrandt
Copy link

After further investigation, this may have been due to an old .build directory from an older version of ino. If you see the error, try deleting .build directory first and see if that fixes it. Please let me know if so.

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

No branches or pull requests

3 participants