tophat / codewatch

[deprecated] Monitor and manage deeply customizable metrics about your python code using ASTs
https://codewatch.io
Apache License 2.0
38 stars 3 forks source link

fix: dynamic astroid version for py version #100

Closed lime-green closed 5 years ago

lime-green commented 5 years ago

Fixes codewatch installation on python2 systems

The wheel file built by codewatch was built in a python 3 environment, and the install requires was dynamically set in setup.py according to the python version there. The wheel file then had a dependency on the python 3 astroid version. I think this is because the wheel distribution method doesn’t use setup.py like sdist does. It parses setup.py at build time rather than at install time.

Now using this approach: https://www.python.org/dev/peps/pep-0508/#environment-markers

DevQA

rm dist/*
pip3 install wheel
python3 setup.py sdist bdist_wheel
pip2 install dist/codewatch-*.whl # make sure this installs astroid 1.6.4
pip3 install dist/codewatch-*.whl # make this installs astroid 2.0.4
codecov[bot] commented 5 years ago

Codecov Report

Merging #100 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #100   +/-   ##
=======================================
  Coverage   93.41%   93.41%           
=======================================
  Files          10       10           
  Lines         395      395           
  Branches       57       57           
=======================================
  Hits          369      369           
  Misses         15       15           
  Partials       11       11
Flag Coverage Δ
#py27 93.41% <ø> (ø) :arrow_up:
#py36 93.41% <ø> (ø) :arrow_up:
#py37 93.41% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d56a059...ccb5492. Read the comment docs.