Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace setup.py versioning scheme with standard convention #895

Merged
merged 6 commits into from
Feb 3, 2023

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Feb 3, 2023

  • Closes installation in development conda env fails #893
  • A workaround to the issue with setuptools>=6.6.0 enforcing PEP440 which was breaking the local package build process for pcmdi_metrics.
  • Bumps isort pre-commit hook to fix a bug that breaks the GH Actions build.

Notes

When bumping pcmdi_metrics for a new release, make sure to update release_version in setup.py.

Also, local builds should be installed using python -m pip install . rather than python setup.py install.

Output

(pmp_dev) vo13@ml-9704174 pcmdi_metrics % python -m pip install .
Processing /Users/vo13/Documents/Repositories/PCMDI/pcmdi_metrics
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pcmdi-metrics
  Building wheel for pcmdi-metrics (PEP 517) ... done
  Created wheel for pcmdi-metrics: filename=pcmdi_metrics-2.5.1-py3-none-any.whl size=1697808 sha256=8eb25d25440ffa247bd2f35c26c212c68bf0cb25d82f6870d2a4e6f4bac54203
  Stored in directory: /private/var/folders/_h/t3wvkks5643fxnv07_kx9cx8000zpt/T/pip-ephem-wheel-cache-e2in5dui/wheels/dd/f6/e5/9a3d70fd7e89a7d0485da7c363747fffce8f6596dab2b28068
Successfully built pcmdi-metrics
Installing collected packages: pcmdi-metrics
Successfully installed pcmdi-metrics-2.5.1

-This fixes the issue with `setuptools>=6.6.0` enforcing PEP440
@tomvothecoder tomvothecoder self-assigned this Feb 3, 2023
@tomvothecoder tomvothecoder marked this pull request as ready for review February 3, 2023 18:45
@tomvothecoder tomvothecoder changed the title Replace versioning scheme with standard convention Replace setup.py versioning scheme with standard convention Feb 3, 2023
@xylar
Copy link
Contributor

xylar commented Feb 3, 2023

This should probably close #894

setup.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@tomvothecoder tomvothecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @xylar, I followed your instructions more closely this time.
Also thanks for pointing out that @lee1043 opened #894 which is a duplicate of this one.

This one includes an additional fix to make pre-commit work, so we can close #894 if preferred.

setup.py Show resolved Hide resolved
Co-authored-by: Xylar Asay-Davis <[email protected]>
@lee1043
Copy link
Contributor

lee1043 commented Feb 3, 2023

Thank you @tomvothecoder and @xylar for your help on this!

@lee1043 lee1043 merged commit e2a9081 into main Feb 3, 2023
@lee1043 lee1043 deleted the bug/893-setuptools branch February 3, 2023 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

installation in development conda env fails
3 participants