Skip to content

Commit f67af35

Browse files
committed
v3.5.0: Support for Linux/Windows/MacOS with Python3.{10,11,12,13} on CI, updated dockerfile
1 parent 95cd6b7 commit f67af35

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

.github/workflows/pytest-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.12", "3.13"]
26+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2727
os: [ubuntu-latest, windows-latest, macos-latest]
2828
runs-on: ${{ matrix.os }}
2929
steps:

Dockerfile

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
FROM ubuntu:bionic
2-
RUN apt-get update && apt-get install lzip git make sudo -y
3-
RUN sudo apt-get install software-properties-common -y
4-
RUN sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
5-
RUN sudo apt-get update
6-
RUN sudo apt-get install gcc-6 g++-6 python3.8 python3.8-dev python3.8-distutils build-essential libssl-dev libffi-dev curl -y
7-
# RUN sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
8-
# RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
9-
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py
10-
RUN echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc
11-
RUN . ~/.bashrc
12-
RUN git clone --recursive https://github.com/ibarrond/Pyfhel
13-
RUN cd Pyfhel && pip3 install .
1+
ARG PY_VERSION="3.12"
2+
ARG VENV_PATH="home/venv"
3+
ARG REPO_PATH="home/Pyfhel"
4+
5+
FROM ubuntu:latest
6+
# Prepare system
7+
RUN apt-get update
8+
RUN apt-get install git -y
9+
# Install Python
10+
ARG PY_VERSION
11+
RUN apt-get install python${PY_VERSION} -y
12+
RUN apt-get install python3-pip -y
13+
RUN apt-get install python3-venv -y
14+
# Create virtual environment
15+
ARG VENV_PATH
16+
RUN python${PY_VERSION} -m venv ${VENV_PATH}
17+
# Clone latest version and install repo
18+
ARG REPO_PATH
19+
RUN git clone --recursive https://github.com/ibarrond/Pyfhel ${REPO_PATH}
20+
RUN . ${VENV_PATH}/bin/activate && cd ${REPO_PATH} && pip install . -v

Pyfhel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
__name__ = "Pyfhel"
88
__author__ = "Alberto Ibarrondo"
99

10-
__version__ = "3.4.3"
10+
__version__ = "3.5.0"

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Python library for Addition, Subtraction, Multiplication and Scalar Product over
1212

1313
| | |
1414
|--------------------------------------------|--------------------------------------------------------------------------------------------|
15-
| :flags: **Language** | Python (3.7+), with Cython and C++ (:warning: _requires a [C++17 compiler][3]_ :warning:.) |
15+
| :flags: **Language** | Python (3.10+), with Cython and C++ ( :warning: _requires a [C++17 compiler][3]_ :warning: ) |
1616
| :computer: **OS** | Linux, Windows & MacOS. |
17-
| :1234: **Version** | 3.4.3 (stable) |
17+
| :1234: **Version** | 3.5.0 (stable) |
1818
| :books: **Docs** | In [readthedocs][1]! |
1919
| :pencil2: **Demos/Examples** | [In the docs][4] with the outputs, sources in the [`examples`][2] folder. |
2020
| :electric_plug: **Backends** | [SEAL][5], [OpenFHE (WIP)][6]. Shipped alongside Pyfhel. |
@@ -25,7 +25,7 @@ Python library for Addition, Subtraction, Multiplication and Scalar Product over
2525

2626
If you wish to cite Pyfhel in your derived work, please use the following BibTeX entry:
2727
```bibtex
28-
@inproceedings{ibarrondo2021pyfhel,
28+
@inproceedings{ibarrondo2021pyfhel,
2929
title={Pyfhel: Python for homomorphic encryption libraries},
3030
author={Ibarrondo, Alberto and Viand, Alexander},
3131
booktitle={Proceedings of the 9th on Workshop on Encrypted Computing \& Applied Homomorphic Cryptography},
@@ -70,9 +70,20 @@ To uninstall, just run:
7070
pip uninstall Pyfhel
7171
```
7272

73+
### With Docker
74+
You can also use Docker to build and run `Pyfhel`. A Dockerfile is provided in the repository, which sets up the necessary environment. Check it up to configure python versions (default 3.12) and virtual environment location (default `/home/venv`). To build the image, just run:
75+
```bash
76+
docker build --tag 'pyfhel-docker' .
77+
```
78+
79+
To run the container interactively, you can use:
80+
```bash
81+
docker run -it pyfhel-docker
82+
```
83+
7384
### Installing a C/C++ Compiler
7485
`Pyfhel` requires a C/C++ compiler with C++17 support. We have tested:
75-
- *gcc6* to *gcc12* in Linux/MacOS/Windows WSL. To install:
86+
- *gcc6* to *gcc14* in Linux/MacOS/Windows WSL. To install:
7687
- Ubuntu: `sudo apt install gcc g++`
7788
- MacOS: `brew install gcc`. MacOS users must also set several environment variables by running:
7889
```bash

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
# Pyfhel's core metadata
1010
[project]
1111
name = "Pyfhel"
12-
version = "3.4.3"
12+
version = "3.5.0"
1313
description = "Python for Homomorphic Encryption Libraries"
1414
readme = "README.md"
15-
requires-python = ">=3.7"
15+
requires-python = ">=3.10"
1616
license = "GPL-3.0-or-later"
1717
keywords = ["homomorphic" , "encryption", "cython", "cryptography"]
1818
authors = [
@@ -23,23 +23,21 @@ classifiers = [
2323
"Programming Language :: C++",
2424
"Programming Language :: Cython",
2525
"Programming Language :: Python :: 3",
26-
"Programming Language :: Python :: 3.7",
27-
"Programming Language :: Python :: 3.8",
28-
"Programming Language :: Python :: 3.9",
2926
"Programming Language :: Python :: 3.10",
3027
"Programming Language :: Python :: 3.11",
3128
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
3230
"Programming Language :: Python :: Implementation :: CPython",
33-
"Development Status :: 5 - Production/Stable",
3431
"Operating System :: Unix",
3532
"Operating System :: POSIX",
3633
"Operating System :: Microsoft :: Windows",
34+
"Operating System :: MacOS",
3735
"Topic :: Security",
3836
"Topic :: Security :: Cryptography",
3937
]
4038

4139
dependencies = [
42-
"numpy>=1.26"
40+
"numpy>=2.1"
4341
]
4442

4543
[project.optional-dependencies]
@@ -61,7 +59,7 @@ requires = [
6159
"setuptools>=64",
6260
"wheel",
6361
"cython>=3.0.0",
64-
"numpy>=1.26",
62+
"numpy>=2.1",
6563
"cmake>=3.15",
6664
"toml>=0.10"
6765
]

0 commit comments

Comments
 (0)