I am developing a Python package and aiming to publish it on PyPI. The setup.py file of the package is structured as follows: Note: I'm trying to install it from a wheel.
from setuptools import find_packages, setup
from pathlib import Path
from setuptools.command.install import install
import subprocess
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setup(
name='mylib',
packages=find_packages(include=['mylib']),
version='0.2.5',
description='my-lib-desc',
author='my-name',
license='MIT',
install_requires=["neuralcoref", "spacy==2.1.0", "allennlp", "allennlp-models", "pandas", "openai"],
setup_requires=['pytest-runner', "spacy== 2.1.0"],
tests_require=['pytest==4.4.1'],
test_suite='tests',
long_description=long_description,
long_description_content_type='text/markdown',
download_url='https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz'
)
print("Installing packages...")
try:
subprocess.check_call(["pip", "install", "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz", "--no-deps"])
except subprocess.CalledProcessError as error:
print(f"Failed to install en_core_web_sm: {error}")
I have added the en_core_web_sm dependency, but it is not getting installed during the package installation process. I have tried installing it using the download_url attribute and by adding it to the install_requires attribute but it fails to install. No error message is thrown during the installation process.
Alternatively, I have also tried the following and this as well fails to install
setup(
name='mylib',
packages=find_packages(include=['mylib']),
version='0.2.5',
description='my-lib-desc',
author='my-name',
license='MIT',
download_url='https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz',
install_requires=["neuralcoref", "spacy==2.1.0", "allennlp", "allennlp-models", "pandas", "openai", "en_core_web_sm-2.1.0.tar.gz],
setup_requires=['pytest-runner', "spacy== 2.1.0"],
tests_require=['pytest==4.4.1'],
test_suite='tests',
long_description=long_description,
long_description_content_type='text/markdown',
)
Could you help me understand why en_core_web_sm is not being installed and suggest a solution?