I have a repository stored on Gitlab containing a python package. The repo structure is more or less something like:
-- my_pkg
|-- my_pkg.egg-info
| |-- PKG-INFO
| |-- SOURCES.txt
| |-- dependency_links.txt
| |-- requires.txt
| |-- top_level.txt
|-- my_pkg
| |-- __init__.py
| |-- _sub_pkg
| | |-- _something.py
| | |-- _something.py
| | |-- ...
| |-- ...
Here is the content of setup.py
:
import setuptools
setuptools.setup(name='my_pkg',
version='0.1.0',
description='a package',
url='',
author='me',
author_email='me@company.com',
license='MIT',
packages=['my_pkg'],
install_requires=[
'more_itertools',
'tqdm',
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
_safe=False)
However, when I try to install this using pip
doing
pip install git+https://gitlab.company.com/something/my_pkg.git
only the top level folder and the __init__.py
files are downloaded. If I go the the path where the package is supposed to be installed, I can't find any sub-directory (e.g. the _sub_pkg
one). This cause clearly the package to fail right after the import as it can't find the files that are imported inside __init__.py
.
I'm really in the dark here and I can't understand what I did wrong. What should I do to fix this?
I'm running this from an Anaconda Powershell Prompt in Windows 10.
EDIT: Added the content of setup.py