'Setup.py install requires local package

I am looking to install a package my-package using setuptools. my-package has a local dependency, utils. My file structure is as follows:

parent/
    my-package/
        my-package/
        setup.py
    utils/
        utils/
        setup.py

I am looking to install the local dependency using the following:

from setuptools import setup
import os

setup(
    name='my-package',
    version='1.0',
    packages=['my-package'],
    install_requires=[
        # location to your my-package project directory
        "file:\\" + os.path.join(os.path.dirname(os.getcwd()), 'utils#egg=utils-1.0')
    ]
)

Unfortunately this errors out with the following:

    ERROR: Command errored out with exit status 1:
     command: /path/to/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/my-package/setup.py'"'"'; __file__='"'"'/home/my-package/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /home/my-package/
    Complete output (1 lines):
    error in my-package setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'://home/'"
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I have tried the solutions here with no luck. Any help is greatly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source