116 Commits

Author SHA1 Message Date
Kay Hayen
9afc8b6f91 Cleanup, sloppy version checks were present
* Also support 3.10 for shebang analysis
2021-08-07 18:11:02 +02:00
Kay Hayen
87d979f63e Nuitka-Python: Fix, static Python detection for Windows wasn't implemented 2021-06-09 09:50:57 +02:00
Maxwell175
f81ea3c1ec Added Nuitka-Python Integration with Windows Static Build (#1104)
* Initial cut for simple static build with only builtin modules.

* Update static build methodology.

* Added Nuitka Python check.
2021-06-02 12:56:10 +02:00
Kay Hayen
f5cd5fa468 UI: Warnings and errors for static libpython options
* We detect if it could be used and output an information.

* We detect if its used in module mode and warn about not
  being used there.

* We error out if it's used with "yes", but the file cannot be found.
2021-05-10 17:21:29 +02:00
Kay Hayen
89f4ba2f40 Scons: Determine system prefix no virtualenv path on the outside
* We already have plugins that use this information too, but were
  using different code, e.g. for numpy.

* The real_prefix attribute is only there and most useful.

* This massively cleans up the backend scons file, where this was
  noise in the backend scons code.
2021-05-10 17:21:29 +02:00
Kay Hayen
e43b72e087 Bump copyright year to 2021. 2021-01-22 09:58:00 +01:00
Kay Hayen
69764f1453 Python3.9: Added official support for it. 2021-01-10 13:12:06 +01:00
Kay Hayen
dd5a9f2dd5 Cleanup, avoid decimal and string comparisons for version checks
* This is in preparation for 3.10 which will fail to work that work.

* Extended numeric values to be hexadecimal.

* Using tuples over strings in testing.
2020-12-17 09:06:53 +01:00
Kay Hayen
fcc4ec382f Python3.9: Claim partial support 2020-11-15 12:26:32 +01:00
Kay Hayen
ac08ddab88 Optimization: Use C bool type for conditions where possible
* This uses nuitka_bool only where necessary, and bool otherwise.

* Solves a bunch of TODO of going via the C type objects
  rather than hardcoding in helper functions.

* This also prepares more C type usage for other C types.

* Removed error checking from truth checking, done on the outside now.
2020-11-05 11:50:52 +01:00
Kay Hayen
1703514e29 Optimization: Use more efficient code generation for more containers
* This does similar for lists, tuples, and sets.

* Also cache the decision if sets should be reversed, so we do not
  use eval more often than necessary.

* Use helpers for lists and tuples that take references, cleaning
  the generated code up a bit there too.
2020-11-05 11:50:52 +01:00
Kay Hayen
9aba078038 Python3.9: Follow complex call error changes 2020-11-02 18:43:07 +01:00
Kay Hayen
8dd8ed93c6 Quality: Updated to latest versions of black and isort 2020-11-02 18:43:05 +01:00
Kay Hayen
82ec73cc7f Plugins: Reverse inclusion logic for NumPy plugin. 2020-07-13 21:32:38 +02:00
Kay Hayen
3f678dca7c Minor cleanups
* Apply black formatting to some comments mostly, but also other
  stuff.
2020-05-01 11:33:17 +02:00
Kay Hayen
b2083575cf Bump copyright year to 2020. 2020-02-01 07:42:45 +01:00
Kay Hayen
6e0e321b69 Python3.6: Handle version number overflow for 3.6.10 or higher
* This is a workaround only, the real solution is to go with hex
  version numbers like CPython does itself, or use its directly.
2020-01-21 22:03:04 +01:00
Kay Hayen
49323d1e10 Python3.8: Consider it supported, most things ought to work now. 2020-01-14 08:58:00 +01:00
Kay Hayen
3b22f106fa Minor cleanups
* From black and clang-format, which we ought to test too before
  merges one day.
2020-01-02 01:10:48 +01:00
gioboske
e5621cb882 Anaconda: Update check for conda envs to support Python > 3.6 (issue #580) (#581)
* Update check for conda envs to support Python > 3.6

* Checking if "Anaconda" is in sys.version string, lead to wrong results for Python ver. > 3.6.

* Update docstring of shallUseStaticLibPython
2019-12-28 08:56:45 +01:00
Kay Hayen
5a244a1d10 Release: Fixup MSI package creation for partially supported versions. 2019-12-16 08:59:40 +01:00
Kay Hayen
d6b7a34a4d Eclipse: Remove PyDev annotations
* We are going to not recommend Eclipse anymore, and PyLint should be
  all that is used either way.

* This was causing only noise in the source code.
2019-09-22 08:48:03 +02:00
Kay Hayen
f3752e381d Quality: Reformated code to black
* Autoformat currently only sorts pylint disable comments, and does
  not call black yet.

* This also adds a few doc strings that I failed to keep separate as a
  commit, but who cares.
2019-02-13 16:27:25 +01:00
Kay Hayen
47c99d377e Bump copyright year to 2019. 2019-01-24 16:28:13 +01:00
Kay Hayen
e7441de36c Miniconda: Add support for statically linked Python with shared library nearby
* At least MiniConda does this, potentially other Python variants too.

* Extension modules work, and as long as a shared library is nearby,
  which it is for MiniConda, programs work too.
2018-08-10 12:14:41 +02:00
Kay Hayen
f5ec304673 Python3.7: Consider it supported, most things ought to work now. 2018-07-26 09:06:45 +02:00
Kay Hayen
3883de6c96 Cleanups
* Mostly for PyLint 2.0.0 and 1.9.2 compatiblity, avoiding local functions
  for complex functions to avoid PyLint bug making a difference.

* Using more comparison chains as warned by PyLint.

* Need to blacklist files because they give false alarms, hopefully only
  for 2.0.0

* Split up class re-formulation into 2 files, otherwise its easy to get
  lost in the code of the other while looking at one.
2018-07-17 10:33:32 +02:00
Kay Hayen
64a989bd34 Modules: Added support for statically linked Python
* Programs won't work that way, but this solves the missing library
  that is not really needed to be linked against.

* Manylinux should work with this for now.
2018-05-10 22:32:38 +02:00
Kay Hayen
cf5131a45c Minor cleanups 2018-04-30 09:49:49 +02:00
Kay Hayen
f5f337d157 Windows: Simply reuse ctypes existing handle to the Python DLL
* This avoids going by name, which apparently also changed for Python3.7
  and made the old code stop working.

* Also in case of an error, make it raise a proper exception instead of
  assertion no error merely.
2018-04-30 09:49:17 +02:00
Kay Hayen
63c4f9e588 Python3.2: Remove official support for this version
* The support for pip is gone, not even old versions can be installed
  anymore.

* Compiling this version yourself is no longer possible on modern Linux
  due to OpeNSSL changes.
2018-04-30 09:48:46 +02:00
Kay Hayen
3957ee8628 Updated copyright year to 2018. 2018-04-30 09:46:54 +02:00
Kay Hayen
44264a9da6 Windows: Uninstalled Python has nothing to do with Python 3.5 or higher
* This was a wrong assumption of mine.

* Also setting "rpath" in this case is no longer necessary as it's done
  always now.
2017-06-05 22:17:56 +02:00
Kay Hayen
70ad44e592 Minor cleanups
* Changing PyLint identifiers to symbolic instead of message ids, easier
  to come up it and know.

* Make sure to error exit PyLint checking. This was regressed when making
  it a tool.

* Some other PyLint cleanups.
2017-05-27 08:08:44 +02:00
Kay Hayen
8bca49bcd4 Python3.6: Added support for async generators
* Added special node types for these, as they are to behave different
  from coroutines and generators.

* Special code generation and compiled types for these too.

* Make a few coroutine functions accessible for re-use in asyncgen,
  but generally they share surpringly little.

* Create all types for coroutines or asyncgens at once, instead of
  one by one.

* This is nearly complete, most tests are working, but not all.
2017-02-13 07:11:05 +01:00
Kay Hayen
dfa23f3a0f Cleanup, remove full compatibility code for unknown encoding.
* No more useful, we just output the best information we have.

* Remove now useless test.
2017-02-05 10:31:34 +01:00
Kay Hayen
c7c435205d Windows: Detect uninstalled Python by looking at DLL location. 2017-02-05 10:31:34 +01:00
Kay Hayen
6b4de42593 Minor cleanups 2017-01-17 20:26:55 +01:00
Kay Hayen
47332da901 Cleanup, syntax errors always improved.
* Always output the best syntax error format, and do away with compatible
  syntax errors. Instead make the comparison restricted to the message
  of error only.

* This reduces tedious code and tried to mimic the various Python versions
  errors for no good reasons.
2017-01-14 16:25:46 +01:00
Kay Hayen
b509a3d986 Need to hard code version dependency for syntax errors.
* Checking the syntax error instance didn't work to determine the
  output done by Python at exit.
2017-01-13 07:47:34 +01:00
Kay Hayen
064df32ff0 Updated copyright year to 2017. 2017-01-09 07:25:38 +01:00
Kay Hayen
3de6dea658 Minor cleanups 2017-01-07 12:24:39 +01:00
Kay Hayen
24191c2284 Minor cleanups 2017-01-07 12:24:39 +01:00
Kay Hayen
66e5e8439d Compatability: Follow changes for syntax error formatting in 3.5 branch.
* They added a few cases where column carets should be there, we add
  those for improved mode, and detect the need for them.

* This should fix build errors in tests for current Debian unstable.
2017-01-07 12:24:39 +01:00
Kay Hayen
09f45008c2 Fix, need to be bug compatible with CPython for set literals
* The evaluation order of set literals is correct, but the values are
  to be added in reverse on unfixed versions of Python.

* This adds a special node type for literals that only changes the
  code generation and run time computation of set literal results,
  for which the built-in set may not be the right thing to use.
2016-12-10 18:08:56 +01:00
Kay Hayen
4449983a9b Windows: Better support for executing tests with debug builds
* Switching from debug build to non-debug build wasn't properly
  working.

* Test runner now detects the filename of debug CPython builds, and
  check if it's there, and switches to it as necessary.
2016-11-30 09:31:50 +01:00
Kay Hayen
672ce6fa91 Minor cleanup 2016-05-14 14:53:17 +02:00
Kay Hayen
08b60dbc9b Minor cleanups 2016-04-20 21:12:56 +02:00
Kay Hayen
c8b0f05a2c Compatibility: Detect error message template for complex call args.
* This used to be static, but was recently changed in at least
  "2.7.11+" in Debian, which is likely a snapshot without proper
  version bump.

* Since this will probably also land in 3.5, lets detect this properly
  at compile time, and turn it into a template. Then we don't have to
  check different versions.
2016-04-20 07:27:52 +02:00
Kay Hayen
9764181535 Minor cleanups
* More files are covered by import sorting now.

* Added more import white listing for PyDev, these failed on my
  desktop.
2016-04-13 07:51:42 +02:00