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

OSX builds are failing #41

Closed
sansyrox opened this issue Jul 6, 2021 · 14 comments
Closed

OSX builds are failing #41

sansyrox opened this issue Jul 6, 2021 · 14 comments

Comments

@sansyrox
Copy link
Member

sansyrox commented Jul 6, 2021

This will create an issue with the release of OSX versions.

Need to fix this.

@messense
Copy link
Contributor

messense commented Jul 9, 2021

You just need to add dist/ to https://github.com/sansyrox/robyn/blob/main/.gitignore

@sansyrox
Copy link
Member Author

sansyrox commented Jul 9, 2021

Thank you @messense . It fixed it 🚀

@sansyrox sansyrox closed this as completed Jul 9, 2021
@sansyrox
Copy link
Member Author

sansyrox commented Jul 9, 2021

@messense , do you also happen about how to add python dependencies to the project?

I tried adding it like this(https://github.com/sansyrox/robyn/pull/40/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711) but it doesn't seem to work.

@sansyrox sansyrox reopened this Jul 9, 2021
@messense
Copy link
Contributor

https://www.python.org/dev/peps/pep-0621/#dependencies-optional-dependencies

Should be

[project]
name = "robyn"
dependencies = [
    "watchdog>=2.1.3,<3"
]

@sansyrox
Copy link
Member Author

sansyrox commented Jul 10, 2021

@messense , it is giving me an error like this

ERROR: Could not find a version that satisfies the requirement watchdog<3,>=2.1.3 (from robyn) (from versions: none)
10
ERROR: No matching distribution found for watchdog<3,>=2.1.3

@messense
Copy link
Contributor

https://github.com/sansyrox/robyn/blob/e2829f51f81b97dcc42210451568bb912f981bbf/.github/workflows/CI.yml#L32

This needs to be changed to something like pip install --force-reinstall dist/robyn*.whl

@sansyrox
Copy link
Member Author

Screenshot 2021-07-12 at 2 28 41 PM

@messense , when I add the dist folder to the .gitignore, the rust binary is not added in installation folder.

If I copy the robyn.so manually to the installation folder then it works fine. Do happen to know the issue here?

@messense
Copy link
Contributor

messense commented Jul 12, 2021

What do you mean? Can you give a list of commands to reproduce it? I downloaded wheels from https://github.com/sansyrox/robyn/actions/runs/1021993930 , they look fine?

@sansyrox
Copy link
Member Author

sansyrox commented Jul 12, 2021

@messense ,Yes sure.

  1. I started a pyenv using pyenv activate venv
  2. I installed robyn using pip pip install robyn==0.5.3
  3. I create a basic robyn script and I run it
  4. I get an error that
File "main.py", line 1, in <module>
    from robyn import Robyn
  File "/Users/bruhh/.pyenv/versions/venv/lib/python3.8/site-packages/robyn/__init__.py", line 1, in <module>
    from robyn.robyn import Server
ModuleNotFoundError: No module named 'robyn.robyn
  1. Then I open the package site and add a custom .so file to make it work

This is done on an OSX machine.

@sansyrox
Copy link
Member Author

Screenshot 2021-07-12 at 2 58 15 PM

The site package doesn't have a .so file

@messense
Copy link
Contributor

Works on my machine

❯ pyenv virtualenv 3.8.5 venv-py38
created virtual environment CPython3.8.5.final.0-64 in 589ms
  creator CPython3Posix(dest=/Users/messense/.pyenv/versions/3.8.5/envs/venv-py38, clear=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/messense/Library/Application Support/virtualenv)
    added seed packages: pip==21.0.1, setuptools==56.0.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Looking in links: /var/folders/8d/h3lyjgz14296j_lw7chgf5hc0000gp/T/tmptz1g6oxd
Requirement already satisfied: setuptools in /Users/messense/.pyenv/versions/3.8.5/envs/venv-py38/lib/python3.8/site-packages (56.0.0)
Requirement already satisfied: pip in /Users/messense/.pyenv/versions/3.8.5/envs/venv-py38/lib/python3.8/site-packages (21.0.1)

~ via 🌙 v5.4.3 took 3s
❯ pyenv activate venv-py38

~ via 🌙 v5.4.3 via 🐍 v3.8.5 (venv-py38) took 2s
❯ pip install -i https://pypi.org/simple robyn==0.5.3
Collecting robyn==0.5.3
  Downloading robyn-0.5.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 2.0 MB/s
Installing collected packages: robyn
Successfully installed robyn-0.5.3
WARNING: You are using pip version 21.0.1; however, version 21.1.3 is available.
You should consider upgrading via the '/Users/messense/.pyenv/versions/3.8.5/envs/venv-py38/bin/python -m pip install --upgrade pip' command.

~ via 🌙 v5.4.3 via 🐍 v3.8.5 (venv-py38)
❯ python
Python 3.8.5 (default, Sep 14 2020, 16:38:27)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import robyn
>>> from robyn import Robyn
>>>
❯ ls /Users/messense/.pyenv/versions/3.8.5/envs/venv-py38/lib/python3.8/site-packages/robyn/
__init__.py                __pycache__                responses.py               robyn.cpython-38-darwin.so
❯ uname -a
Darwin messense.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

@sansyrox
Copy link
Member Author

This is very strange 😓

Why did you use https://pypi.org/simple tho?

@messense
Copy link
Contributor

My pip setup defaults to company private registry.

@sansyrox
Copy link
Member Author

Ah, got it. I guess then it is an issue for my machine only.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants