Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install dependencies in setup.py #105

Closed
3 tasks
reingart opened this issue Mar 19, 2023 · 0 comments
Closed
3 tasks

pip install dependencies in setup.py #105

reingart opened this issue Mar 19, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@reingart
Copy link
Member

reingart commented Mar 19, 2023

Dependencies should be declared in setup.py so this package could be installed doing

pip install https://github.com/PyAr/pyafipws/archive/main.zip

In the future, this package will be published in PyPI to just run pip install pyafipws
More info: reingart#66

install_requires should be added to setup function (probably reading requirements.txt)

Documentation:
https://python-packaging.readthedocs.io/en/latest/dependencies.html

Example to try for setup.py:

setup(
    name="PyAfipWs",
    ...,
    install_requires=[
        "httplib2>=0.20.4",
        "pysimplesoap @ git+https://github.com/pysimplesoap/pysimplesoap.git@py311#pysimplesoap",
        "cryptography>=3.4.7",
        "fpdf>=1.7.2",
        "dbf>=0.88.019",
        "Pillow>=2.0.0",
        "tabulate>=0.8.5",
        "certifi>=2020.4.5.1",
        "qrcode>=6.1",
        "future>=0.18.2",
    ],
    options=opts,
    data_files=data_files,
    classifiers=[
        ...
    ],
    keywords="webservice electronic invoice pdf traceability",
    **kwargs
)

Warnings:

  • packages version should be relaxed (>= or ~) to avoid diamond dependency issue (avoid conflicts or forcing other project with our versions)
  • we should test latest versions this instead the pinned dependencies in the requirements.txt
  • we would need to use pip-tools or similar to freeze requirements.txt
@reingart reingart added enhancement New feature or request good first issue Good for newcomers labels Mar 19, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Mar 27, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Mar 27, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Mar 27, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Mar 27, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Apr 11, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Apr 11, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Jun 10, 2023
HanslettTheDev added a commit to HanslettTheDev/pyafipws that referenced this issue Jun 17, 2023
Signed-off-by: HanslettTheDev <[email protected]>

fix: improved the get_dependencies function to grab all dependency modules

Signed-off-by: HanslettTheDev <[email protected]>

fix: improved the get_dependencies function to grab all dependency modules; commit signed

Signed-off-by: HanslettTheDev <[email protected]>

fix: fixed the issue with pip not detecting links

Signed-off-by: HanslettTheDev <[email protected]>

fix: removed the python version number in the requirements.txt file
fix: fixed the error when replacing the links with the module name
The overall errors fixed was to prevent the setup.py build from failing

Signed-off-by: HanslettTheDev <[email protected]>

feat: get all dependencies from the requirements.txt file to be used by
the setup.py build process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants