Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert FLiT into a python module #317

Open
mikebentley15 opened this issue Jan 24, 2020 · 0 comments
Open

Convert FLiT into a python module #317

mikebentley15 opened this issue Jan 24, 2020 · 0 comments
Labels
documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests

Comments

@mikebentley15
Copy link
Collaborator

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 mikebentley15 added documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests labels Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests
Projects
None yet
Development

No branches or pull requests

1 participant