I am creating a python wheel file where I need to include some specific folders and non-python files. I used a manifest.in file to graft the main folder containing all the other folders and files using the line: graft skolnado/myfolder1
My setup.py file looks like this:
import setuptools
version = {}
with open("version.py") as v:
exec(v.read(), version)
setuptools.setup(
name="skolnado",
version=version["VERSION"],
packages=[
"skolnado",
"skolnado.myfolder1"
],
include_package_data=True,
install_requires=[
"packaging"
]
)
This is the build portion of my .gitlab-ci.yml file:
stages:
- build
- release
build-package:
image: python:3.8
stage: build
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
artifacts:
paths:
- dist/
script:
- pip install setuptools
- python setup.py bdist_wheel
When I run python setup.py bdist_wheel from a local command line it creates the wheel file with all the folders and files I want it to include. The problem is that when I try to create the wheel file in a ci/cd pipeline on gitlab I run the same python setup.py bdist_wheel command but when I do it is like it ignores the manifest.in graft command completely and all the folders and data are missing. It doesn't make much sense to me that it works outside the pipeline but fails inside the pipeline.
I thought it was maybe a windows vs linux thing since the pipeline is in linux but I also successfully got the folders/data when running it from a linux command line. I am hoping that someone else has experienced a similar issue, I am brand new to ci/cd.
This is also my first time asking a question on stack overflow instead of just lurking so thanks in advance for any help or pointers about how to improve my question.