Giter Site home page Giter Site logo

my-package's Introduction

Conda packaging

This project showcases how to create and use a conda package.

Usage

  • Create a conda virtual environment with python 3.9 , e.g. :

    conda create --name my_package python=3.9
    
  • Install the package from the tarball archive already built and living in the /dist folder. You can conveniently use the make command:

    make install
    

That's it ! You can now use the package modules and their methods by importing them as you would do with any other python package or library.

You can test it directly from the python shell :

python
>>> from my_package import my_module
>>> print(my_module.add_one(41))
42
>>>

Or via the interactive script:

python my_script.py

You can uninstall the package as any other python package with the command:

conda remove my_package 

Rebuild the package

You can also rebuild the package if you want.

In this case you have to:

  • Create a conda environment from the build_environment.yaml file since some other packages such as conda-build and conda-verify are required:

    conda env create -f build_environment.yaml
    

    A conda environment called my_package will be created and all the required packages installed.

    If you have already created the my_package environment (conda create --name my_package python=3.9) you can update it with the requirements necessary for building:

    conda env update --name my_package --file build_environment.yaml
    
  • Use the make command to build the package:

    make build
    

The content of the /dist folder will be removed and the package will be built if some tests are passed.

It might take few minutes depending on your machine.

my-package's People

Contributors

fratambot avatar

Watchers

 avatar

my-package's Issues

use cross-platform build

The tarball path points to the dist/osx-64 folder (see .env file) but that won't work if someone is building on a Windows machine.

Use noarch instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.