FLiT icon indicating copy to clipboard operation
FLiT copied to clipboard

Convert FLiT into a python module

Open mikebentley15 opened this issue 5 years ago • 0 comments

Feature Request

Describe the new feature: What if we could install FLiT as a python module? Think of something like

pip install flit

It would still install the flit command-line tool, but also have some stuff available from python. For example, what if you could do this:

from flit import bisect

bisect.main(['--precision=double', 'g++ -O3 -mfma', 'MyTest'])

We could maybe make things easier such as having a function you could call from the library that would return the bisect results in a nice structure you could manipulate and query. If we were to make more changes like that, I would recommend posting a new issue for those improvements.

Suggested change:

  • Move scripts in scripts/flitcli into a different place more idiomatic to python module practices.
  • Create a flit/__init__.py script that imports each module and makes them available as their base name (e.g., flit_bisect is available as simply bisect)
  • Replace the top-level Makefile with a setup.py script that uses python's installation utilities.
  • Get it working with pip
  • Submit flit to pypy so users can do pip install flit

mikebentley15 avatar Jan 24 '20 21:01 mikebentley15