gitless icon indicating copy to clipboard operation
gitless copied to clipboard

Windows support 2

Open techtonik opened this issue 7 years ago • 20 comments

https://github.com/sdg-mit/gitless/issues/13#issuecomment-302825930

There are issues with Windows. tox tests fail.

py27 runtests: commands[0] | nosetests
.................FFF................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEE
  • [x] setup AppVeyor @spderosso?
  • [ ] fix Windows tests - https://ci.appveyor.com/project/spderosso/gitless-11bfm

techtonik avatar May 20 '17 10:05 techtonik

I've setup appveyor (2a0b6a6fc54f0836c79751cdedede6c890704382) but we are missing something because the build fails before executing the tests.

The problem seems to be an access denied error on a temp file. If there's a Windows expert out there that wants to figure out what's going on that'd be awesome

spderosso avatar May 21 '17 00:05 spderosso

Why libgit2 should be built from source? gitless just needs a wheel binary.

https://github.com/libgit2/libgit2/blob/master/appveyor.yml

techtonik avatar May 21 '17 01:05 techtonik

The script follows the installation instructions for pygit2. Pygit2 requires libgit2 to be installed and it seems like the preferred approach for installing libgit2 is to build it from source.

spderosso avatar May 21 '17 14:05 spderosso

@spderosso it is pygit2 bug then.

techtonik avatar May 21 '17 17:05 techtonik

Perhaps, but the build log says:

Installed c:\projects\gitless\.eggs\pygit2-0.25.1-py2.7-win32.egg

which suggests that pygit2 was correctly installed. Yet the file that is causing the error is the cffi backend, which is related to pygit2.

I am going to try to see if I can reproduce it locally.

spderosso avatar May 21 '17 19:05 spderosso

@spderosso what is the pip version? I'd expect it to build and install wheel and not egg.

techtonik avatar Jun 04 '17 13:06 techtonik

I filled https://github.com/libgit2/pygit2/pull/714 to update Windows installation instructions. I see no need to rebuild pygit2 from source.

techtonik avatar Jul 07 '17 18:07 techtonik

Now tests on Python 3 fail because of pbs https://ci.appveyor.com/project/spderosso/gitless/build/1.0.12/job/0osex6dyvhxk9xx3#L71 with:

pbs.CommandNotFound: __path__

Either fork and patch https://github.com/techtonik/pbs or switch to https://github.com/tomerfiliba/plumbum/issues/332

techtonik avatar Jul 23 '17 08:07 techtonik

I abandoned bad habit of using Windows, so feel free to pick up this issue.

techtonik avatar Aug 25 '17 11:08 techtonik

GL works with Cygwin on Windows, but native support via binary wheels is the way to go.

ArneBachmann avatar Oct 13 '17 19:10 ArneBachmann

Are there any plans to get a running windows version? I‘d like to use it, but I need to use Windows 7 at my work.

Thank you!

SpecialAgentX avatar Oct 23 '18 11:10 SpecialAgentX

I feel that I should note it here, but gitless seems to work fine on Windows after you install Python 2.7 (tested with the 32-bit version). Afterwards, just do: python -m ensurepip and python -m pip install gitless

arigo avatar Oct 21 '19 06:10 arigo

Any word on this? Python 2 has been obsolete for years, and is officially deprecated. Windows is a very popular OS. What's the limfac on releasing a Windows binary or something that runs on top of Py 3?

David-OConnor avatar Feb 21 '20 01:02 David-OConnor

@David-OConnor

  1. Fix link to AppVeyor automatic tests after repo renaming - see README
  2. Fix AppVeyor
  3. Fix tests
  4. Run tests on Python 3 to see what is broken

If you running Windows, you can run the tests and report results here.

techtonik avatar Feb 21 '20 08:02 techtonik

I'd like to help running tests on Windows (I'm developing in Delphi & CMD on Windows and the white papers on Gitless read like that's finally the solution to Git screwing with my source because I got some arcane detail wrong), but I have trouble getting started.

If someone would find the motivation to get a newbie willing to learn started, I'd be rather grateful.

Ruffnik avatar Jul 23 '20 11:07 Ruffnik

@NeoBoot With the new changes I just pushed, Gitless should now work on Windows if you have Python 3.8. See: https://ci.appveyor.com/project/spderosso/gitless-11bfm

Can you or anyone else using Windows check that it works? You can follow the instructions on the README file to install from source and run the tests. There appears to be a problem with Windows+Python 3.7, which I might be able to take a look at later this week.

spderosso avatar Aug 12 '20 23:08 spderosso

Using a Python 3.8 conda environment, I was able to install gitless, with a twist:

conda install "pygit2==0.28.2"
pip install gitless

Note that conda install pygit2 will install version 1.2.1 which collides with the pip package dependencies.

Running Gitless:

(py38) C:\Users\xyz>gl --help
Traceback (most recent call last):
  File "c:\programdata\miniconda3\envs\py38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\programdata\miniconda3\envs\py38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Miniconda3\envs\py38\Scripts\gl.exe\__main__.py", line 4, in <module>
  File "c:\programdata\miniconda3\envs\py38\lib\site-packages\gitless\cli\gl.py", line 18, in <module>
    from pbs import ErrorReturnCode
  File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 575, in __getattr__
    return self.env[name]
  File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 527, in __missing__
    return Command._create(k)
  File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 265, in _create
    if not path: raise CommandNotFound(program)
pbs.CommandNotFound: __path__

ArneBachmann avatar Aug 13 '20 12:08 ArneBachmann

Thanks! I didn’t cut a new release yet, so to try the new changes you need to clone the gitless repo, cd to the root of the repo and do ./setup.py install

On Thu, Aug 13, 2020 at 5:22 AM Arne Bachmann [email protected] wrote:

Using a Python 3.8 conda environment, I was able to install gitless, with a twist:

conda install "pygit2==0.28.2"

pip install gitless

Note that conda install pygit2 will install version 1.2.1 which collides with the pip package dependencies.

Running Gitless:

(py38) C:\Users\xyz>gl --help

Traceback (most recent call last):

File "c:\programdata\miniconda3\envs\py38\lib\runpy.py", line 194, in _run_module_as_main

return _run_code(code, main_globals, None,

File "c:\programdata\miniconda3\envs\py38\lib\runpy.py", line 87, in _run_code

exec(code, run_globals)

File "C:\ProgramData\Miniconda3\envs\py38\Scripts\gl.exe_main_.py", line 4, in

File "c:\programdata\miniconda3\envs\py38\lib\site-packages\gitless\cli\gl.py", line 18, in

from pbs import ErrorReturnCode

File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 575, in getattr

return self.env[name]

File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 527, in missing

return Command._create(k)

File "c:\programdata\miniconda3\envs\py38\lib\site-packages\pbs.py", line 265, in _create

if not path: raise CommandNotFound(program)

pbs.CommandNotFound: path

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gitless-vcs/gitless/issues/146#issuecomment-673445427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPS24EIOEIUGAEQQ3TDSDSAPLJFANCNFSM4DMFAGYA .

-- Sent from Gmail Mobile

spderosso avatar Aug 13 '20 14:08 spderosso

Yeah that seems to work :-)

C:\Users\Arne\Desktop\forks>git clone https://github.com/gitless-vcs/gitless.git
Cloning into 'gitless'...
remote: Enumerating objects: 4130, done.
remote: Total 4130 (delta 0), reused 0 (delta 0), pack-reused 4130
Receiving objects: 100% (4130/4130), 22.40 MiB | 3.07 MiB/s, done.
Resolving deltas: 100% (2580/2580), done.

C:\Users\Arne\Desktop\forks\gitless>activate py38

(py38) C:\Users\Arne\Desktop\forks\gitless>python setup.py build
running build
running build_py
creating build
creating build\lib
creating build\lib\gitless
copying gitless\core.py -> build\lib\gitless
copying gitless\__init__.py -> build\lib\gitless
creating build\lib\gitless\cli
copying gitless\cli\commit_dialog.py -> build\lib\gitless\cli
copying gitless\cli\file_cmd.py -> build\lib\gitless\cli
copying gitless\cli\gl.py -> build\lib\gitless\cli
copying gitless\cli\gl_branch.py -> build\lib\gitless\cli
copying gitless\cli\gl_checkout.py -> build\lib\gitless\cli
copying gitless\cli\gl_commit.py -> build\lib\gitless\cli
copying gitless\cli\gl_diff.py -> build\lib\gitless\cli
copying gitless\cli\gl_fuse.py -> build\lib\gitless\cli
copying gitless\cli\gl_history.py -> build\lib\gitless\cli
copying gitless\cli\gl_init.py -> build\lib\gitless\cli
copying gitless\cli\gl_merge.py -> build\lib\gitless\cli
copying gitless\cli\gl_publish.py -> build\lib\gitless\cli
copying gitless\cli\gl_remote.py -> build\lib\gitless\cli
copying gitless\cli\gl_resolve.py -> build\lib\gitless\cli
copying gitless\cli\gl_status.py -> build\lib\gitless\cli
copying gitless\cli\gl_switch.py -> build\lib\gitless\cli
copying gitless\cli\gl_tag.py -> build\lib\gitless\cli
copying gitless\cli\gl_track.py -> build\lib\gitless\cli
copying gitless\cli\gl_untrack.py -> build\lib\gitless\cli
copying gitless\cli\helpers.py -> build\lib\gitless\cli
copying gitless\cli\pprint.py -> build\lib\gitless\cli
copying gitless\cli\__init__.py -> build\lib\gitless\cli

(py38) C:\Users\Arne\Desktop\forks\gitless>pip install -e .
Obtaining file:///C:/Users/Arne/Desktop/forks/gitless
Collecting pygit2==1.2.0
  Downloading pygit2-1.2.0-cp38-cp38-win_amd64.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 1.7 MB/s
Collecting argcomplete>=1.11.1
  Downloading argcomplete-1.12.1-py2.py3-none-any.whl (38 kB)
Collecting cffi
  Downloading cffi-1.14.3-cp38-cp38-win_amd64.whl (179 kB)
     |████████████████████████████████| 179 kB 2.2 MB/s
Collecting cached-property
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 3.3 MB/s
Installing collected packages: pycparser, cffi, cached-property, pygit2, argcomplete, gitless
  Running setup.py develop for gitless
Successfully installed argcomplete-1.12.1 cached-property-1.5.2 cffi-1.14.3 gitless pycparser-2.20 pygit2-1.2.0

(py38) C:\Users\Arne\Desktop\forks\gitless>gl
Gitless: a version control system built on top of Git.
More info, downloads and documentation at http://gitless.com

commands:

    track               start tracking changes to files
    untrack             stop tracking changes to files
    status              show status of the repo
    diff                show changes to files
    commit              save changes to the local repository
    branch              list, create, delete, or edit branches
    tag                 list, create, or delete tags
    checkout            checkout committed versions of files
    merge               merge the divergent changes of one branch onto another
    resolve             mark files with conflicts as resolved
    fuse                fuse the divergent changes of a branch onto the current branch
    remote              list, create, edit or delete remotes
    publish             publish commits upstream
    switch              switch branches
    init                create an empty git repository or clone remote
    history             show commit history

(py38) C:\Users\Arne\Desktop\forks\gitless>gl status
On branch master, repo-directory //

Tracked files with modifications:
  ➜ these will be automatically considered for commit
  ➜ use gl untrack f if you don't want to track changes to file f
  ➜ if file f was committed before, use gl checkout f to discard local changes

    There are no tracked files with modifications to list


Untracked files:
  ➜ these won't be considered for commit
  ➜ use gl track f if you want to track changes to file f

    There are no untracked files to list

ArneBachmann avatar Oct 20 '20 16:10 ArneBachmann

Same issue here.

pip install gitless fails with "ERROR: Failed building wheel for pygit2". (and running pip install pygit2 doesn't help)

luiz00martins avatar Aug 17 '23 18:08 luiz00martins