Skip to content

Commit

Permalink
add python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed Dec 23, 2024
1 parent 15809fd commit abce356
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 29 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://nrel-pysam.readthedocs.io


## Requirements
1. Python 3.8 - 3.12, 64 bit
1. Python 3.8 - 3.13, 64 bit
2. Operating system:
- MacOSX 10.7+
- Most Linux
Expand All @@ -24,7 +24,7 @@ https://nrel-pysam.readthedocs.io
pip install nrel-pysam
```

2. Anaconda (Versions > 1.2.1 only):
2. Anaconda (Versions > 1.2.1, < 6.0.0 only):
```
conda install -c nrel nrel-pysam
```
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [SAM Release updates for Version 2024.12.12](https://nrel.github.io/SAM/doc/releasenotes.html)
* GenericSystem renamed to CustomGeneration
* Fix attribute error when using "value" on non-existing attribute (#178)
* Added Python 3.13 support

## Version 5.1.0, Mar 13, 2024 - SAM 2023.12.17, Revision 1, SSC Version 290
* [SAM Release updates for Version 2023.12.17 Revision 1](https://nrel.github.io/SAM/doc/releasenotes.html)
Expand Down
2 changes: 1 addition & 1 deletion build_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cmake ${SAMNTDIR}/api -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=1 -DSAM_SKIP_AU
make -j 6 || exit

cd $PYSAMDIR
for PYTHONENV in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312
for PYTHONENV in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313
do
yes | /opt/python/$PYTHONENV/bin/pip install -r tests/requirements.txt
yes | /opt/python/$PYTHONENV/bin/pip uninstall NREL-PySAM
Expand Down
4 changes: 2 additions & 2 deletions build_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ source $(conda info --base)/etc/profile.d/conda.sh
rm -rf build
rm -rf dist/*

for PYTHONENV in pysam_build_3.8 pysam_build_3.9 pysam_build_3.10 pysam_build_3.11 pysam_build_3.12
for PYTHONENV in pysam_build_3.8 pysam_build_3.9 pysam_build_3.10 pysam_build_3.11 pysam_build_3.12 pysam_build_3.13
do
conda activate $PYTHONENV
yes | pip install -r tests/requirements.txt
Expand All @@ -48,7 +48,7 @@ cd ..
if [ "$(python3 -c "import platform; print(platform.processor())")" = "arm" ]
then
docker pull quay.io/pypa/manylinux2014_aarch64
# docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64 /bin/bash
# # docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux2014_aarch64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_aarch64 /io/pysam/build_manylinux.sh || exit
else
docker pull quay.io/pypa/manylinux2014_x86_64
Expand Down
2 changes: 1 addition & 1 deletion build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd %PYSAMDIR%
echo y | rmdir build /s
echo y | del dist\*

FOR %%i IN (pysam_build_3.8 pysam_build_3.9 pysam_build_3.10 pysam_build_3.11, pysam_build_3.12) DO (
FOR %%i IN (pysam_build_3.8 pysam_build_3.9 pysam_build_3.10 pysam_build_3.11, pysam_build_3.12 pysam_build_3.13) DO (
call deactivate
call activate %%i
echo y | pip install -r tests/requirements.txt
Expand Down
24 changes: 1 addition & 23 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json, marshal, os, shutil
from setuptools import setup, Extension
import sys
from distutils.core import Command
from files.version import __version__
from pathlib import Path

Expand Down Expand Up @@ -161,23 +160,6 @@ def _decode(o):
))


# function to rename macosx distribution for Python 3.7 to be minimum version of 10.12 instead of 10.14
class PostProcess(Command):
description = "rename macosx distribution for Python 3.7 to be minimum version of 10.12 instead of 10.14"
user_options = []

def initialize_options(self):
self.cwd = None

def finalize_options(self):
self.cwd = os.getcwd()

def run(self):
assert os.getcwd() == self.cwd, 'Must be in package root: %s' % self.cwd
name = "NREL_PySAM-" + latest_version + "-" + "cp37-cp37m-macosx_10_14_x86_64.whl"
newname = "NREL_PySAM-" + latest_version + "-" + "cp37-cp37m-macosx_10_12_x86_64.whl"
os.system('mv ./dist/' + name + ' ./dist/' + newname)

###################################################################################################
#
# setup script
Expand All @@ -203,12 +185,8 @@ def read_lines(filename):
package_dir={'PySAM': 'files', 'PySAM.Hybrids': 'files/Hybrids'},
package_data={
'': libfiles},
setup_requires=["pytest-runner"],
setup_requires=read_lines(Path(__file__).parent / "requirements.txt"),
tests_require=["pytest"],
install_requires=read_lines(Path(__file__).parent / "requirements.txt"),
cmdclass={
'post': PostProcess
},
ext_modules=extension_modules
)

Expand Down

0 comments on commit abce356

Please sign in to comment.