License problem with 16 when installing on Databricks#1011
License problem with 16 when installing on Databricks#1011dwsmith1983 wants to merge 2 commits intopy-why:mainfrom
Conversation
PEP 621 violation failing on databricks install Fixes py-why#1010 Signed-off-by: dustin <dwsmith1983@users.noreply.github.com>
Update pyproject.toml to fix build issue on databricks
| description = "This package contains several methods for calculating Conditional Average Treatment Effects" | ||
| readme = "README.md" | ||
| keywords = ["treatment-effect"] | ||
| license = "MIT" |
There was a problem hiding this comment.
PEP 621 has been superseded by PEP 639 and is now deprecated - see https://packaging.python.org/en/latest/specifications/pyproject-toml/#license and https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files, so we definitely do not want to make this change.
This is not a problem when using a recent version of setuptools. I think just updating setuptools (via pip install -U setuptools if you're in an environment managed by pip) should fix any issues; perhaps we could change line 69 to "setuptools>77.03" to force a more recent version but reverting to the deprecated license scheme doesn't make sense.
There was a problem hiding this comment.
@kbattocchi please test your suggestion on Databricks. We cannot override pre-installed packages even if we upgrade it. This is on DBR 17
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 74.0.0
Not uninstalling setuptools at /usr/local/lib/python3.12/dist-packages, outside environment /local_disk0/.ephemeral_nfs/envs/pythonEnv-07bbc370-afd6-4f28-8e32-234ba964c593
Can't uninstall 'setuptools'. No files were found to uninstall.
Successfully installed setuptools-80.9.0
Now install econml:
Downloading econml-0.16.0.tar.gz (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/1.7 MB ? eta -:--:--
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 48.5 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [95 lines of output]
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
DESCRIPTION:
`Project license <[https://peps.python.org/pep-0621/#license>`_](https://peps.python.org/pep-0621/#license%3E%60_).
GIVEN VALUE:
"MIT"
PEP 621 violation causes issues with installing databricks.
Signed-off-by: Dustin Smith dustin.william.smith@gmail.com
Fixes #1010