[Scons-users] Recommendation on PyCharm config when working with SCons
KANNEGIESER Veit (MM)
veit.kannegieser at magnetimarelli.com
Mon Apr 8 11:36:21 EDT 2019
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hello,
> Your SConscripts are scons's "configuration script", which are not
> executed directly by the Python interpreter, but rather handled
> by SCons in... ummm... interesting ways.
When trying to use pylint to find ugly places and to get code
refactoring hints like for Python 3 support,
i use in SConstruct files:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# resolve names for pylint
if 'SCons' not in sys.modules:
from scons_dummy import AddPostAction, Alias, Clean, Default, \
Delete, Depends, Environment, Exit, Export, GetOption, \
Import, SConscript, SideEffect
vs2010 = Environment()
ghsARM = Environment()
iarARM = Environment()
tools = Environment()
ignore_missing_subprojects = False
only_engineering = False
comm_crc32_ML = 0
comm_crc32_TS = 0
comm_crc32_TD = 0
comm_crc32_report_ML = []
comm_crc32_report_TS = []
comm_crc32_report_TD = []
def get_version_and_counter_arguments():
'''for pylint only'''
return ('0001', '001', '0001')
def printTextFrame(list_arg):
'''for pylint only'''
if list_arg:
pass
def removeIfExist(name_arg):
'''for pylint only'''
if name_arg:
pass
so it imports functions that allow SCons like syntax, and it localy
implements some functions that otherwise would be in SConscript files.
If you are using the editor in PyCharm,
> or Atom, or Visual Studio Code, or SublimeText, or other popular
> Python editing systems that are more or less IDE, how is it going
> to figure out the SCons API that your SConscript uses? As you've
> seen, the call SConscript("blab") is just an undefined reference.
>
> You can probably import SCons into your sconscript as a temporary
> measure and see if it helps what you're after:
>
> from SCons.Script import *
>
>
> PyCharm and Visual Studio Code - the two I've looked at - have
> languages for describing what you want to recognize. VS Code uses
> TextMate, which PyCharm used to, but they have transitioned away
> for grammar extensions (PyCharm extension themselves are written
> in Java, sadly) - I don't remember what the new technology is
> called. But in glancing at plugin development docs, it's hard to
> see where this goes, because, again, things don't work in the same
> order as for a "normal" Python program.
>
>
>
>
>
> _______________________________________________ Scons-users
> mailing list Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
regards
- --
Veit Kannegieser
software developer
Magneti Marelli GmbH
Instrument Cluster and Display
Waldburgstraße 21
70563 Stuttgart
Tel: +49 711 12371 129
Fax: +49 711 12371 198
mailto:Veit.Kannegieser at magnetimarelli.com
Manager: Heinrich-Gerhard Schüring
Domicile: Stuttgart
Court of Registry: Stuttgart, HRB 761189
please send plain text mail.
please ignore the mail server appended spam.
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEElP6zc7O10FCIcxYNH1Nrgn5dJmkFAlyramIACgkQH1Nrgn5d
JmkBvBAAvSJPe2uxdoDFh992JY0dRnpAC9NFo6JMXvzG4dYtp5M9/RkutMg2ibqF
BgHx8nTSuO6U4QnLmNXTLP+v0WvyiJ1d5Oe8JbD7c4ompjBfJvSLJegX4TbNZHjD
v61ThncC8siDJymqNR+YcxJmTerTs3ayRBhYi2pwBMuLKp28Ld+ZVV4qkmHEBZf2
oGcIlPALY3ZzvVYP8tAI9L0kmwUheaaJpuRs0U/npFC+bvY255pWYvwE0av7wwxQ
qujf4UjOjgWZ1Q/bmVISzNwviMiOJYs94IbySMz/VVN9hl5onnPy2lf+kqT3OepE
VCNvqJ4XwbdsaUuo6EBumq8bG5b59AIW+NG0PadDCGUmS7w96f4C5Ph3jtCJ7TSW
od/2b4dKQCJajsn+4cEaDQrVjEa9vXiy3v/wgvVC4yN/ulL5eaTWwk1RajfhC4cE
5/WJMfk7nUwvGb6oaYanOWwxAXdbKbGUKZb7KRdApk2+7OtyhXygSxLacw3Sw4ro
ncuQ1tvSRyKJ3CkNIEJUq+bHbnmI3m8iCPXhKDdKprpegZrO2h/LKiKBXcfBvYgx
gjmnipy9risTqnv9MQ2U/LzeHHW3TjbBSq5J/Rymb4EsgXNNNgIlqClG+s+zZ4s4
QTghulsEnKsqpTwBqfOe26MH84f4L349jIP/duyenVlIsbiSDtQ=
=VfhJ
-----END PGP SIGNATURE-----
Besuchen Sie unseren Internetauftritt! - VISIT OUR WEB SITE! www.magnetimarelli.com Dieses Dokument ist vertraulich zu behandeln. Es ist nicht gestattet, es ohne unsere ausdrückliche Genehmigung weiterzuleiten, zu vervielfältigen oder den Inhalt zu verwerten. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte den Absender und löschen diese Email. This document is to be treated confidentially. It is not allowed to pass on, duplicate, exploit or disclose the contents of this email in all respects without our expressed permission. If you are not the intended recipient, please contact the sender and delete this message. ---------------------------------------------------------------------------------------------------------- Geschäftsführer: Heinrich-Gerhard Schuering Sitz der Gesellschaft: Stuttgart Amtsgericht: Stuttgart HRB 761189
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scons_dummy.py
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20190408/1f5e4870/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scons_dummy.py.sig
Type: application/octet-stream
Size: 566 bytes
Desc: scons_dummy.py.sig
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20190408/1f5e4870/attachment-0001.obj>
More information about the Scons-users
mailing list