pytest-dev / unittest2pytest

helps rewriting Python `unittest` test-cases into `pytest` test-cases
GNU General Public License v3.0
128 stars 27 forks source link

setup.py - don't import package #8

Closed adamchainz closed 8 years ago

adamchainz commented 8 years ago

It's best practice not to import the code itself inside setup.py in case dependencies etc. aren't available. Using a parsing function to extract __version__ is a bit of cargo culting I use on all my projects to avoid doing so whilst keeping the version defined in a single place.