Skip to content

[xcvrd] Add enum dependence back; Install 'enum34' conditionally based on Python version#107

Merged
jleveque merged 3 commits intosonic-net:masterfrom
jleveque:fix_enum
Nov 3, 2020
Merged

[xcvrd] Add enum dependence back; Install 'enum34' conditionally based on Python version#107
jleveque merged 3 commits intosonic-net:masterfrom
jleveque:fix_enum

Conversation

@jleveque
Copy link
Copy Markdown
Contributor

@jleveque jleveque commented Oct 31, 2020

Add dependence on 'enum' package back to xcvrd (basically reverting most of #106). However, in setup.py, we only install the enum34 package if the version of Python we are installing for is < 3.4. Thus, when installing the Python 3 xcvrd package in Python 2.7, the Python 2 version of enum34 will be installed. However, if installing the Python 3 xcvrd package on Python 3.7, enum34 will not be installed, causing xcrvd to import the 'enum' module from the standard library. This should prevent any conflicts which arise when 'enum34' is ever installed on Python versions >= 3.4 by preventing this situation.

@jleveque jleveque changed the title [xcvrd] Add enum dependence back; Import 'enum34' conditionally based on Python version [xcvrd] Add enum dependence back; Install 'enum34' conditionally based on Python version Oct 31, 2020
@jleveque jleveque merged commit 600d043 into sonic-net:master Nov 3, 2020
@jleveque jleveque deleted the fix_enum branch November 3, 2020 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants