OpenMined / PyDP

The Python Differential Privacy Library. Built on top of: https://github.com/google/differential-privacy
Apache License 2.0
507 stars 138 forks source link

Windows port #280

Closed BenjaminDev closed 4 years ago

BenjaminDev commented 4 years ago

Description

Working on #112. This is new PR on the same issue as a number of the initial changes have been correctly moved upstream see google/differential-privacy#47 (still open) and google/differential-privacy#34 (closed)

Adding windows support for PyDP.

Notes

There are 4 files changed here but only 2 are needed when the upstream library merges PR google/differential-privacy#47

Required changes to python-dp to support windows:

  1. Added workflow done here
  2. Added _pydp.pyd to setup.py package_data={"pydp": ["_pydp.so","_pydp.pyd"],}, so the windows package includes the built binary.

Extra changes that are WIP for now and will be reomved when PR google/differential-privacy#47 is merged.

  1. Updated .gitsubmodules to point to my personal fork of the google/differential-privacy
  2. Moved the SHA that we build against to after the upstream library merged google/differential-privacy#34

    Windows python-dp wheels

    If you want to test the wheels or use for a demo feel free to look here for a windows wheel:

    python -m venv .venv
    .\venv\Scripts\activate
    (.venv)$ python -m pip install https://github.com/BenjaminDev/PyDP/releases/download/3.8-0.1.7-win_amd64-beta.7/python_dp-0.1.7-cp38-cp38-win_amd64.whl
    (.venv)$ python -c "import pydp; print(pydp.__version__)" 

Affected Dependencies

Moved base library to a private fork. Don't merge yet WIP. See notes above.

How has this been tested?

Checklist

TODO

  1. Remove the publishing for wheels to github releases
  2. Add the publishing of wheels to PyPI.
BenjaminDev commented 4 years ago

Update:

Notes: To support windows I had to add configs to the .bazelrc file and so when you build you'll need to add --config Linux, --config macOS or --config Windows. I have not updated the make files nor scripts with this change. It's a easy fix if you run into it and a small change to fix. I just cannot test make and .sh files on this windows box. So to build on linux bazel build --config Linux .......

chinmayshah99 commented 4 years ago

Fixes #111 , #112