diff --git a/README.md b/README.md index f17971f441..ffc969aba7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Installing Panda3D ================== The latest Panda3D SDK can be downloaded from -[this page](https://www.panda3d.org/download/sdk-1-10-6/). +[this page](https://www.panda3d.org/download/sdk-1-10-7/). If you are familiar with installing Python packages, you can use the following command: @@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can [click here](https://github.com/rdb/panda3d-thirdparty) for instructions on building them from source. -- https://www.panda3d.org/download/panda3d-1.10.6/panda3d-1.10.6-tools-win64.zip -- https://www.panda3d.org/download/panda3d-1.10.6/panda3d-1.10.6-tools-win32.zip +- https://www.panda3d.org/download/panda3d-1.10.7/panda3d-1.10.7-tools-win64.zip +- https://www.panda3d.org/download/panda3d-1.10.7/panda3d-1.10.7-tools-win32.zip After acquiring these dependencies, you can build Panda3D from the command prompt using the following command. Change the `--msvc-version` option based @@ -136,7 +136,7 @@ macOS ----- On macOS, you will need to download a set of precompiled thirdparty packages in order to -compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.6/panda3d-1.10.6-tools-mac.tar.gz). +compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.7/panda3d-1.10.7-tools-mac.tar.gz). After placing the thirdparty directory inside the panda3d source directory, you may build Panda3D using a command like the following: diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index a25c387697..5be82aa362 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -1022,7 +1022,10 @@ class build_apps(setuptools.Command): source_dir = os.path.dirname(source_path) target_dir = os.path.dirname(target_path) base = os.path.basename(target_path) - self.copy_dependencies(target_path, target_dir, search_path + [source_dir], base) + + if source_dir not in search_path: + search_path = search_path + [source_dir] + self.copy_dependencies(target_path, target_dir, search_path, base) def copy_dependencies(self, target_path, target_dir, search_path, referenced_by): """ Copies the dependencies of target_path into target_dir. """ @@ -1037,8 +1040,7 @@ class build_apps(setuptools.Command): pe = pefile.PEFile() pe.read(fp) for lib in pe.imports: - if not lib.lower().startswith('api-ms-win-'): - deps.append(lib) + deps.append(lib) elif magic == b'\x7FELF': # Elf magic. Used on (among others) Linux and FreeBSD. diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index c4657a4894..79cf156c83 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -52,6 +52,7 @@ Deployment * Fix libffi-7.dll not being included in official wheels * PYTHONINSPECT mechanism is no longer enabled when building with optimizations * A few unnecessary warning messages are squelched +* Windows builds now include previously missing CRT dlls API * Add pickle support to Datagram class diff --git a/makepanda/makepackage.py b/makepanda/makepackage.py index 243ebc6fa7..558ee1d6bc 100755 --- a/makepanda/makepackage.py +++ b/makepanda/makepackage.py @@ -726,7 +726,7 @@ def MakeInstallerFreeBSD(version, python_versions=[], **kwargs): oscmd("rm -f %s/tmp/python_dep" % outputdir) if "PYTHONVERSION" in SDK: - pyver_nodot = SDK["PYTHONVERSION"][6:].replace('.', '') + pyver_nodot = SDK["PYTHONVERSION"][6:].rstrip('dmu').replace('.', '') else: pyver_nodot = "%d%d" % (sys.version_info[:2]) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 61a4332b07..7230195652 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -3360,7 +3360,7 @@ def GetCurrentPythonVersionInfo(): from distutils.sysconfig import get_python_lib return { - "version": SDK["PYTHONVERSION"][6:], + "version": SDK["PYTHONVERSION"][6:].rstrip('dmu'), "soabi": GetPythonABI(), "ext_suffix": GetExtensionSuffix(), "executable": sys.executable, diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index 25ad11935c..8f860864cd 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -610,6 +610,26 @@ def makewheel(version, output_dir, platform=None): whl.ignore_deps.update(MANYLINUX_LIBS) + # Add libpython for deployment. + if sys.platform in ('win32', 'cygwin'): + pylib_name = 'python{0}{1}.dll'.format(*sys.version_info) + pylib_path = os.path.join(get_config_var('BINDIR'), pylib_name) + elif sys.platform == 'darwin': + pylib_name = 'libpython{0}.{1}.dylib'.format(*sys.version_info) + pylib_path = os.path.join(get_config_var('LIBDIR'), pylib_name) + else: + pylib_name = get_config_var('LDLIBRARY') + pylib_arch = get_config_var('MULTIARCH') + libdir = get_config_var('LIBDIR') + if pylib_arch and os.path.exists(os.path.join(libdir, pylib_arch, pylib_name)): + pylib_path = os.path.join(libdir, pylib_arch, pylib_name) + else: + pylib_path = os.path.join(libdir, pylib_name) + + # If Python was linked statically, we don't need to include this. + if not pylib_name.endswith('.a'): + whl.write_file('deploy_libs/' + pylib_name, pylib_path) + # Add the trees with Python modules. whl.write_directory('direct', direct_dir) @@ -738,26 +758,6 @@ if __debug__: whl.write_file(info_dir + '/README.md', readme_src) whl.write_file_data(info_dir + '/top_level.txt', 'direct\npanda3d\npandac\npanda3d_tools\n') - # Add libpython for deployment - if sys.platform in ('win32', 'cygwin'): - pylib_name = 'python{0}{1}.dll'.format(*sys.version_info) - pylib_path = os.path.join(get_config_var('BINDIR'), pylib_name) - elif sys.platform == 'darwin': - pylib_name = 'libpython{0}.{1}.dylib'.format(*sys.version_info) - pylib_path = os.path.join(get_config_var('LIBDIR'), pylib_name) - else: - pylib_name = get_config_var('LDLIBRARY') - pylib_arch = get_config_var('MULTIARCH') - libdir = get_config_var('LIBDIR') - if pylib_arch and os.path.exists(os.path.join(libdir, pylib_arch, pylib_name)): - pylib_path = os.path.join(libdir, pylib_arch, pylib_name) - else: - pylib_path = os.path.join(libdir, pylib_name) - - # If Python was linked statically, we don't need to include this. - if not pylib_name.endswith('.a'): - whl.write_file('deploy_libs/' + pylib_name, pylib_path) - whl.close() diff --git a/tests/showbase/test_PythonUtil.py b/tests/showbase/test_PythonUtil.py index c4c1b8076a..6b9d50cde0 100644 --- a/tests/showbase/test_PythonUtil.py +++ b/tests/showbase/test_PythonUtil.py @@ -146,14 +146,6 @@ def test_weighted_choice(): # Assert that we got 'item1'. assert item == items[0] - # Test PythonUtil.weightedChoice() with an invalid sum. - # This time, we're using 2000 so that regardless of the random - # number, we will still reach the very last item. - item = PythonUtil.weightedChoice(choicelist, sum=100000) - - # Assert that we got 'item8', since we would get the last item. - assert item == items[-1] - # Create a bogus random function. rnd = lambda: 0.5