Closed johnyf closed 10 years ago
Closing to open a pull request into branch dev
, instead of branch master
. Retargeting the merge seems to be possible with some github-fu, but a first attempt failed and so just going to use the ugly solution.
Re-opened after it was decided that a dev
branch will not be used.
After the pull request tulip-control/tulip-control#87 is accepted, changes from it will be incorporated here so that tulip
and polytope
are using the same non-release version strings protocols.
to have a single place where it is defined, while avoiding importing the
polytope
package when importing the version intosetup.py
. After thinking of creating apolytope/__version__.py
file, searching led to this discussionJustification for design choices:
version.py
instead of__version__.py
because__version__
must be a string according to PEP 396.version.py
named version instead of__version__
to avoid creating a__main__.__version__
variable when exec is executed withinsetup.py
exec
command avoids loading thepolytope
package, was borrowed from the discussion linked above. If instead one attempts to use frompolytope.version import __version__
insetup.py
, thepolytope.__init__
will be automatically imported, triggering imports frompolytope.polytope
, which in turn requiresnumpy
that may not yet be installed, because all this occurs before setup tools fetch and install dependencies.version_info
seems to be common practiceDrawbacks of the approach: file littering, ugly
exec
command