Tuesday, 2020-12-08

*** tpb has joined #symbiflow00:00
*** az0re has quit IRC00:20
*** az0re has joined #symbiflow00:28
*** az0re has quit IRC00:30
*** az0re has joined #symbiflow01:01
*** maartenBE has quit IRC01:18
*** maartenBE has joined #symbiflow01:23
*** Degi_ has joined #symbiflow01:25
*** Degi has quit IRC01:29
*** Degi_ is now known as Degi01:29
*** DonQuezz has quit IRC01:31
*** citypw has joined #symbiflow02:19
*** _whitelogger has quit IRC02:51
*** _whitelogger has joined #symbiflow02:53
*** cjearls has quit IRC03:34
*** _whitelogger has quit IRC04:42
*** _whitelogger has joined #symbiflow04:44
*** kgugala__ has joined #symbiflow06:20
*** kgugala has quit IRC06:22
*** kgugala__ has quit IRC07:43
*** kgugala has joined #symbiflow07:43
*** _whitenotifier has joined #symbiflow09:36
-_whitenotifier- [fpga-tool-perf] acomodi opened issue #291: Add CI check for check-env and list-combination functionalities - https://git.io/JIRpx10:54
-_whitenotifier- [symbiflow-arch-defs] acomodi opened issue #1859: Consistently use XDC constraints in all tests - https://git.io/JI0fS11:26
-_whitenotifier- [symbiflow-arch-defs] mkurc-ant opened issue #1861: Undocumented POWER_REG content of MMCM - https://git.io/JI0Nk15:19
-_whitenotifier- [symbiflow-arch-defs] mkurc-ant opened issue #1862: Unknown bit in A35T - https://git.io/JI0p815:30
-_whitenotifier- [yosys-symbiflow-plugins] rw1nkler opened issue #62: Fix curly brackets support in get_ports commands - https://git.io/JIEfV15:50
*** maartenBE has quit IRC16:31
*** citypw has quit IRC16:51
*** maartenBE has joined #symbiflow16: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/JIEGD17:30
mithro@HackerFoo You want https://stackoverflow.com/questions/41268863/difference-between-extras-require-and-install-requires-in-setup-py/45043494#4504349417:55
tpbTitle: python - Difference between extras_require() and install_requires() in setup.py? - Stack Overflow (at stackoverflow.com)17:55
mithroHackerFoo: If you have ever seen `<packagename>[<option>]` that is what we want17:56
HackerFoomithro: Thanks.18:01
*** maartenBE has quit IRC18:18
*** mkru has joined #symbiflow18:25
*** maartenBE has joined #symbiflow18:42
mithro@HackerFoo Ideally there would be a `fasm[antlr]` type option which enabled the faster antlr backend parser18:48
HackerFooI can't find a way to read the extras in setup.py18:48
HackerFooSo I've added the textX parser as a fallback, which also works at runtime if there is a missing library.18:49
HackerFooThis is all I found: https://stackoverflow.com/questions/55737009/how-to-get-extras-from-pip-install-in-custom-cmdclass-command18:50
tpbTitle: 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
HackerFooBecause the CMake build will fail, blocking setup.py build18:51
HackerFooIf there are missing dependencies.18:51
HackerFooSo 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
mithroHackerFoo: 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
HackerFooThe problem I have is that there doesn't seem to be a way to express the dependency on non-Python things.18:58
mithroHackerFoo: you are correct18:58
HackerFooSo the only way to detect a missing dependency for the ANTLR version is to try it.18:58
mithroHackerFoo: That is where conda comes in18:58
HackerFooConda works until you need something outside of that as well.19:01
HackerFooSo it's a never ending stack of package managers.19:01
mithroHackerFoo: If you need something outside of conda, the correct solution is to pull it inside conda19:02
mithroHackerFoo: 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
HackerFoomithro: How about this approach? https://github.com/SymbiFlow/fasm/pull/28/commits/cb8b595420cbb0842504ce6f612260d52640e30f19:17
HackerFooI almost have it working.19:18
mithroHackerFoo: 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
mithroAnd maybe having `fasm.parse.antlr` and `fasm.parse.textx` shipped separately from `fasm`?19:21
HackerFooDo I need 3 repos then? Or just 3 subdirectories.19:22
mithroHackerFoo: You could even go as far as creating a `fasm.parse.interface` module which `fasm.parse.textx` and `fasm.parse.antlr` use?19:22
mithroHackerFoo: Three subdirectories should work I think19:23
HackerFooI 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
mithroHackerFoo: Actually maybe there can just be a `--with-antlr` / `--without-antlr`command line switches to `setup.py` in some way?19:28
mithroHackerFoo: https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides19:29
tpbTitle: pip install - pip documentation v20.3.1Contents (at pip.pypa.io)19:29
mithroThat might be a bad idea, unsure...19:29
HackerFooI'd like the previous pip install commands to just work.19:29
mithroHackerFoo: I agree with that -- Maybe something like `--antlr=[enabled|disabled|auto]` with `auto` being the default?19:31
mithroHackerFoo: https://docs.python.org/3/distutils/setupscript.html#other-options19:31
tpbTitle: 2. Writing the Setup Script Python 3.9.1 documentation (at docs.python.org)19:31
mithroThe `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
HackerFooI like `--parser=[python|native|auto]`19:33
mithroHackerFoo: Yeah, that could work19:33
*** mkru has quit IRC20:23
*** maartenBE has quit IRC20: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 me20:55
HackerFooOkay, thanks.20:56
HackerFooI have the auto version working.20:56
HackerFooIt issues a warning on import if textX is used, and fasm.parser_implementation is either 'ANTLR' or 'textX'.20:57
*** _whitelogger has quit IRC20:57
mithroHackerFoo: Can you use `fasm.parser.implementation`?20:57
HackerFooYeah, probably.20:58
*** _whitelogger has joined #symbiflow21:00
*** maartenBE has joined #symbiflow21:03
*** _whitelogger has quit IRC21:03
*** _whitelogger has joined #symbiflow21:06
-_whitenotifier- [fasm] HackerFoo opened issue #32: Publish to PyPI - https://git.io/JIEy221:30
*** alexhw has joined #symbiflow21:42
*** alexhw_ has quit IRC21:42
*** az0re has quit IRC21:42
*** az0re has joined #symbiflow21:45
HackerFoomithro: 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
HackerFoomithro: 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
HackerFooI have overridden the class that handles this, so it doesn't apply.21:56
HackerFooAccording to: https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides21:57
tpbTitle: 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 IRC22:06
*** maartenBE has joined #symbiflow22:30
mithro@HackerFoo You might also want a `fasm.parser.available` which lists which parsers are available?22:41
HackerFooI can do this, but how would it be used? Should the options match the submodule names?22:44
mithroHackerFoo: yeap? Same as `fasm.parser.implementation` value?22:45
HackerFooOkay, then I need to change those values to lower case names.22:45
mithroHackerFoo: 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
HackerFooYes.22:46
HackerFooBut if you just use fasm.parser, you get ANTLR unless that fails, then you get textX.22:47
mithroYeap, unless you deliberately import the textx parser directly, right?22:47
HackerFooI suppose you can use fasm.parser.{antlr,textx} directly, though. Yeah.22:47
mithroWhich you might want when explicitly testing that your thing works with both parsers or something22:48
HackerFooOkay.22:49
*** kgugala has quit IRC23:46
*** kgugala has joined #symbiflow23:46

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!