Skip to content

mfansler/envvar-pythonpath-null

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Conda Build and Publish Anaconda Cloud version platforms downloads updated

This Conda package uses activation/deactivation scripts to set the environment variable PYTHONPATH="" when activating a Conda environment, effectively insulating the Conda environment from Python modules provided by this variable.

Installation

The package is hosted on Anaconda Cloud. It can be installed with

conda install merv::envvar-pythonpath-null

Users wishing to have PYTHONPATH="" set for all environments by default can use

conda config --add create_default_packages merv::envvar-pythonpath-null

which will include this package automatically in all future environments at environment creation.

Reuse and Repurposing

This package is a proof-of-concept to demonstrate managing environment variables in Conda environments through the "unit of computation" of Conda, which is the Conda package. It is released under a CC0 license (i.e., public domain). Feel free to use this repository as an outline for similar packages.

The environment variables are set/unset in the recipe/[de]activate.{bat,sh} files. While there is not a standing convention for packages managing environment variables, this uses the template envvar-<variable_name>-<value>.

The repository includes a GitHub Workflow that builds and uploads the package to Anaconda Cloud. For the uploading portion to work, users should adjust the ANACONDA_USER variable in the conda-build.yml workflow file and need to set an ANACONDA_TOKEN repository secret corresponding to an access token for their Anaconda Cloud account with the "Allow all API operations" permission.

About

Conda package to mask PYTHONPATH

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published