UKZN-Astronomy / corrcal

Python/C code for calibration of quasi-redundant arrays. Different (fixed) algorithm from original corrcal
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Put main package in src directory #23

Closed steven-murray closed 4 years ago

steven-murray commented 4 years ago

The problem of it loading the local package rather than the installed one is a common problem and the most suggested fix is to put your actual package in a (non-python-package) src/ folder. So you'd have:

corrcal/
    setup.py
    src/
        corrcal/
            __init__.py

This will also help in testing (because pytest will by default pick up the local package rather than the installed one, which is usually not what you want!)

See https://blog.ionelmc.ro/2014/05/25/python-packaging/ for example.

piyanatk commented 4 years ago

PR submitted #30