*** tpb has joined #symbiflow | 00:00 | |
*** az0re has quit IRC | 00:20 | |
*** az0re has joined #symbiflow | 00:28 | |
*** az0re has quit IRC | 00:30 | |
*** az0re has joined #symbiflow | 01:01 | |
*** maartenBE has quit IRC | 01:18 | |
*** maartenBE has joined #symbiflow | 01:23 | |
*** Degi_ has joined #symbiflow | 01:25 | |
*** Degi has quit IRC | 01:29 | |
*** Degi_ is now known as Degi | 01:29 | |
*** DonQuezz has quit IRC | 01:31 | |
*** citypw has joined #symbiflow | 02:19 | |
*** _whitelogger has quit IRC | 02:51 | |
*** _whitelogger has joined #symbiflow | 02:53 | |
*** cjearls has quit IRC | 03:34 | |
*** _whitelogger has quit IRC | 04:42 | |
*** _whitelogger has joined #symbiflow | 04:44 | |
*** kgugala__ has joined #symbiflow | 06:20 | |
*** kgugala has quit IRC | 06:22 | |
*** kgugala__ has quit IRC | 07:43 | |
*** kgugala has joined #symbiflow | 07:43 | |
*** _whitenotifier has joined #symbiflow | 09:36 | |
-_whitenotifier- [fpga-tool-perf] acomodi opened issue #291: Add CI check for check-env and list-combination functionalities - https://git.io/JIRpx | 10:54 | |
-_whitenotifier- [symbiflow-arch-defs] acomodi opened issue #1859: Consistently use XDC constraints in all tests - https://git.io/JI0fS | 11:26 | |
-_whitenotifier- [symbiflow-arch-defs] mkurc-ant opened issue #1861: Undocumented POWER_REG content of MMCM - https://git.io/JI0Nk | 15:19 | |
-_whitenotifier- [symbiflow-arch-defs] mkurc-ant opened issue #1862: Unknown bit in A35T - https://git.io/JI0p8 | 15:30 | |
-_whitenotifier- [yosys-symbiflow-plugins] rw1nkler opened issue #62: Fix curly brackets support in get_ports commands - https://git.io/JIEfV | 15:50 | |
*** maartenBE has quit IRC | 16:31 | |
*** citypw has quit IRC | 16:51 | |
*** maartenBE has joined #symbiflow | 16:52 | |
-_whitenotifier- [symbiflow-arch-defs] acomodi opened issue #1863: Routing on Zynq with PS7 takes a long time on the first iteration - https://git.io/JIEGD | 17:30 | |
mithro | @HackerFoo You want https://stackoverflow.com/questions/41268863/difference-between-extras-require-and-install-requires-in-setup-py/45043494#45043494 | 17:55 |
---|---|---|
tpb | Title: python - Difference between extras_require() and install_requires() in setup.py? - Stack Overflow (at stackoverflow.com) | 17:55 |
mithro | HackerFoo: If you have ever seen `<packagename>[<option>]` that is what we want | 17:56 |
HackerFoo | mithro: Thanks. | 18:01 |
*** maartenBE has quit IRC | 18:18 | |
*** mkru has joined #symbiflow | 18:25 | |
*** maartenBE has joined #symbiflow | 18:42 | |
mithro | @HackerFoo Ideally there would be a `fasm[antlr]` type option which enabled the faster antlr backend parser | 18:48 |
HackerFoo | I can't find a way to read the extras in setup.py | 18:48 |
HackerFoo | So I've added the textX parser as a fallback, which also works at runtime if there is a missing library. | 18:49 |
HackerFoo | This is all I found: https://stackoverflow.com/questions/55737009/how-to-get-extras-from-pip-install-in-custom-cmdclass-command | 18:50 |
tpb | Title: python - How to get extras from pip install in custom cmdclass command? - Stack Overflow (at stackoverflow.com) | 18:50 |
mithro | @HackerFoo Why do you need to "get extras"? | 18:50 |
HackerFoo | Because the CMake build will fail, blocking setup.py build | 18:51 |
HackerFoo | If there are missing dependencies. | 18:51 |
HackerFoo | So I wrap that in try/except, but then it's probably best to just require textX in `install_requires` so that the fallback is there. | 18:53 |
mithro | HackerFoo: I guess you could split it into three packages, `fasm-textx`, `fasm-antlr` and `fasm` with `fasm` depending on `fasm-textx` or `fasm-antlr`? | 18:56 |
HackerFoo | The problem I have is that there doesn't seem to be a way to express the dependency on non-Python things. | 18:58 |
mithro | HackerFoo: you are correct | 18:58 |
HackerFoo | So the only way to detect a missing dependency for the ANTLR version is to try it. | 18:58 |
mithro | HackerFoo: That is where conda comes in | 18:58 |
HackerFoo | Conda works until you need something outside of that as well. | 19:01 |
HackerFoo | So it's a never ending stack of package managers. | 19:01 |
mithro | HackerFoo: If you need something outside of conda, the correct solution is to pull it inside conda | 19:02 |
mithro | HackerFoo: But splitting it into three packages might work? Then you just do a `try: import fasm.antlr as fasm_paster\nexcept ImportError: import fasm.textx as fasm_paser`inside the `fasm` package? | 19:16 |
HackerFoo | mithro: How about this approach? https://github.com/SymbiFlow/fasm/pull/28/commits/cb8b595420cbb0842504ce6f612260d52640e30f | 19:17 |
HackerFoo | I almost have it working. | 19:18 |
mithro | HackerFoo: I think that is pretty much what I'm suggesting if you take it one step further and change `from fasm.parse_fasm import parse_fasm_filename, parse_fasm_string, parser_implementation` to `from fasm.parse.antlr import parse_fasm_filename, parse_fasm_string, parser_implementation` | 19:20 |
mithro | And maybe having `fasm.parse.antlr` and `fasm.parse.textx` shipped separately from `fasm`? | 19:21 |
HackerFoo | Do I need 3 repos then? Or just 3 subdirectories. | 19:22 |
mithro | HackerFoo: You could even go as far as creating a `fasm.parse.interface` module which `fasm.parse.textx` and `fasm.parse.antlr` use? | 19:22 |
mithro | HackerFoo: Three subdirectories should work I think | 19:23 |
HackerFoo | I think using pip to install from a git repo requires setup.py to be at the root. | 19:26 |
mithro | `python -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"` | 19:27 |
mithro | HackerFoo: Actually maybe there can just be a `--with-antlr` / `--without-antlr`command line switches to `setup.py` in some way? | 19:28 |
mithro | HackerFoo: https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides | 19:29 |
tpb | Title: pip install - pip documentation v20.3.1Contents (at pip.pypa.io) | 19:29 |
mithro | That might be a bad idea, unsure... | 19:29 |
HackerFoo | I'd like the previous pip install commands to just work. | 19:29 |
mithro | HackerFoo: I agree with that -- Maybe something like `--antlr=[enabled|disabled|auto]` with `auto` being the default? | 19:31 |
mithro | HackerFoo: https://docs.python.org/3/distutils/setupscript.html#other-options | 19:31 |
tpb | Title: 2. Writing the Setup Script Python 3.9.1 documentation (at docs.python.org) | 19:31 |
mithro | The `optional` option is a boolean; if it is true, a build failure in the extension will not abort the build process, but instead simply not install the failing extension. | 19:31 |
HackerFoo | I like `--parser=[python|native|auto]` | 19:33 |
mithro | HackerFoo: Yeah, that could work | 19:33 |
*** mkru has quit IRC | 20:23 | |
*** maartenBE has quit IRC | 20:51 | |
mithro | @HackerFoo You can leave the publishing to PyPi of the fasm binary to me, make sure you log a github issue and assign it to me | 20:55 |
HackerFoo | Okay, thanks. | 20:56 |
HackerFoo | I have the auto version working. | 20:56 |
HackerFoo | It issues a warning on import if textX is used, and fasm.parser_implementation is either 'ANTLR' or 'textX'. | 20:57 |
*** _whitelogger has quit IRC | 20:57 | |
mithro | HackerFoo: Can you use `fasm.parser.implementation`? | 20:57 |
HackerFoo | Yeah, probably. | 20:58 |
*** _whitelogger has joined #symbiflow | 21:00 | |
*** maartenBE has joined #symbiflow | 21:03 | |
*** _whitelogger has quit IRC | 21:03 | |
*** _whitelogger has joined #symbiflow | 21:06 | |
-_whitenotifier- [fasm] HackerFoo opened issue #32: Publish to PyPI - https://git.io/JIEy2 | 21:30 | |
*** alexhw has joined #symbiflow | 21:42 | |
*** alexhw_ has quit IRC | 21:42 | |
*** az0re has quit IRC | 21:42 | |
*** az0re has joined #symbiflow | 21:45 | |
HackerFoo | mithro: I've moved the parser implementations into fasm.parser, so that you can `import fasm.parser` and it will select an implementation, which can be checked with `fasm.parser.implementation`. | 21:53 |
HackerFoo | mithro: Do you think we need a setup flag? The auto selection seems to work pretty well. | 21:54 |
HackerFoo | > The `optional` option is a boolean; if it is true, a build failure in the extension will not abort the build process, but instead simply not install the failing extension. | 21:56 |
HackerFoo | I have overridden the class that handles this, so it doesn't apply. | 21:56 |
HackerFoo | According to: https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides | 21:57 |
tpb | Title: pip install - pip documentation v20.3.1Contents (at pip.pypa.io) | 21:57 |
HackerFoo | > This disables the use of wheels (cached or otherwise) for that package, as setup.py does not exist for wheels. | 21:57 |
*** maartenBE has quit IRC | 22:06 | |
*** maartenBE has joined #symbiflow | 22:30 | |
mithro | @HackerFoo You might also want a `fasm.parser.available` which lists which parsers are available? | 22:41 |
HackerFoo | I can do this, but how would it be used? Should the options match the submodule names? | 22:44 |
mithro | HackerFoo: yeap? Same as `fasm.parser.implementation` value? | 22:45 |
HackerFoo | Okay, then I need to change those values to lower case names. | 22:45 |
mithro | HackerFoo: Because if you don't have Antlr installed when installing the module you end up with an installation which can only use textx right? | 22:45 |
HackerFoo | Yes. | 22:46 |
HackerFoo | But if you just use fasm.parser, you get ANTLR unless that fails, then you get textX. | 22:47 |
mithro | Yeap, unless you deliberately import the textx parser directly, right? | 22:47 |
HackerFoo | I suppose you can use fasm.parser.{antlr,textx} directly, though. Yeah. | 22:47 |
mithro | Which you might want when explicitly testing that your thing works with both parsers or something | 22:48 |
HackerFoo | Okay. | 22:49 |
*** kgugala has quit IRC | 23:46 | |
*** kgugala has joined #symbiflow | 23:46 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!